Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lollerfirst committed Jan 4, 2025
1 parent 203bfac commit 3d19f19
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 28 deletions.
18 changes: 5 additions & 13 deletions dist/lib/es5/CashuWallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -696,22 +696,14 @@ var CashuWallet = /** @class */ (function () {
*/
CashuWallet.prototype.createMultiPathMeltQuote = function (invoice, partialAmount) {
return __awaiter(this, void 0, void 0, function () {
var _a, supported, params, mppOption, meltOptions, meltQuotePayload, meltQuote;
var _this = this;
return __generator(this, function (_b) {
switch (_b.label) {
var supported, mppOption, meltOptions, meltQuotePayload, meltQuote;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a = this.mintInfo.isSupported(15), supported = _a.supported, params = _a.params;
supported = this.mintInfo.isSupported(15).supported;
if (!supported) {
throw new Error('Mint does not support NUT-15');
}
if (!(params === null || params === void 0 ? void 0 : params.filter(function (method) {
if (method.method === 'bolt11' && method.unit === _this.unit) {
return true;
}
}).length)) {
throw new Error("Mint does not support MPP for bolt11 and ".concat(this.unit));
}
mppOption = {
amount: partialAmount
};
Expand All @@ -725,7 +717,7 @@ var CashuWallet = /** @class */ (function () {
};
return [4 /*yield*/, this.mint.createMeltQuote(meltQuotePayload)];
case 1:
meltQuote = _b.sent();
meltQuote = _a.sent();
return [2 /*return*/, meltQuote];
}
});
Expand Down
18 changes: 5 additions & 13 deletions dist/lib/es6/CashuWallet.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3d19f19

Please sign in to comment.