Skip to content

Commit

Permalink
Merge pull request cashubtc#123 from gudnuf/bug/send_keysetId
Browse files Browse the repository at this point in the history
Bug/send keyset + make meltQuote optional in payLnInvoice
  • Loading branch information
gandlafbtc authored May 20, 2024
2 parents 39cbb8f + b60254e commit 8653951
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/CashuWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ class CashuWallet {
counter?: number;
pubkey?: string;
privkey?: string;
keysetId?: string;
}
): Promise<SendResponse> {
if (options?.preference) {
Expand Down Expand Up @@ -323,7 +324,7 @@ class CashuWallet {
* Initialize the wallet with the mints public keys
*/
private async getKeys(keysetId?: string, unit?: string): Promise<MintKeys> {
if (!this._keys || this._keys.id !== keysetId) {
if (!this._keys || (keysetId !== undefined && this._keys.id !== keysetId)) {
const allKeys = await this.mint.getKeys(keysetId);
let keys;
if (keysetId) {
Expand Down Expand Up @@ -452,7 +453,7 @@ class CashuWallet {
async payLnInvoice(
invoice: string,
proofsToSend: Array<Proof>,
meltQuote: MeltQuoteResponse,
meltQuote?: MeltQuoteResponse,
options?: {
keysetId?: string;
counter?: number;
Expand Down
4 changes: 2 additions & 2 deletions src/model/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,8 @@ export type Token = {
*/
memo?: string;
/**
* the unit of the token
*/
* the unit of the token
*/
unit?: string;
};
/**
Expand Down

0 comments on commit 8653951

Please sign in to comment.