Skip to content

Commit 9e670e9

Browse files
authored
fix: add margin to the nativeFee obtained from the result (#894)
1 parent dfc8d6f commit 9e670e9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

apps/helixbox-app/src/bridges/lnbridge-base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ export class LnBridgeBase extends BaseBridge {
5656
address: sendService,
5757
abi: (await import(`../abi/lnaccess-controller`)).default,
5858
functionName: "fee",
59-
args: [BigInt(remoteChain.id), bytesToHex(Uint8Array.from([123]), { size: Math.ceil(messageSizeInByte * 1.01) })], // To leave some margin, we added a 1% redundancy.
59+
args: [BigInt(remoteChain.id), bytesToHex(Uint8Array.from([123]), { size: messageSizeInByte })],
6060
});
61-
return nativeFee;
61+
return (nativeFee * 110n) / 100n; // To leave some margin, we added a 10% redundancy.
6262
}
6363

6464
protected async _getMsglineFeeAndParams(

0 commit comments

Comments
 (0)