mirror of
https://github.com/tompro/sattle.git
synced 2026-08-27 07:15:59 +00:00
feat: reusable mint fee math with cached quotes, fee-aware Max in move funds
This commit is contained in:
@@ -52,6 +52,9 @@ interface MockTargetMintOptions {
|
||||
preimage: string;
|
||||
// value of the note a claim mints, in msat
|
||||
noteAmountMsat: number;
|
||||
// optional payRequest metadata advertising a receive fee, e.g.
|
||||
// '[["text/plain","Mint fees: 2000,0"]]' (flat 2000 msat, 0 ppm)
|
||||
mintFeeMetadata?: string;
|
||||
}
|
||||
|
||||
export class MintMocker {
|
||||
@@ -127,7 +130,7 @@ export class MintMocker {
|
||||
maxSendable: 100_000_000_000,
|
||||
withdrawLink: `${origin}${NOTE_PATH}`,
|
||||
mintPubkey: options.mintPubkey,
|
||||
metadata: '[]',
|
||||
metadata: options.mintFeeMetadata ?? '[]',
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user