Skip to content

Commit 372a20c

Browse files
committed
refactor(root): pull BASE_AMOUNT in example main to constant
BTC-0 TICKET: BTC-0
1 parent 1f6cdfb commit 372a20c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/ts/btc/omni/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import * as utxolib from '@bitgo/utxo-lib';
1111
const RECEIVE_ADDRESS = '';
1212
const SEND_ADDRESS = '';
1313
const ASSET_ID = 31;
14+
const BASE_AMOUNT = 729100000n; // this is currently 7.291 USDT
1415

1516
async function getWallet() {
1617
return await omniConfig.sdk.coin(omniConfig.coin).wallets().get({ id: omniConfig.walletId });
@@ -103,7 +104,7 @@ async function main() {
103104

104105
const wallet = await getWallet();
105106
// we multiply feeRate by 1000 because mempool returns sat/vB and BitGo uses sat/kvB
106-
await sendOmniAsset(wallet, RECEIVE_ADDRESS, SEND_ADDRESS, 729100000n, ASSET_ID, feeRate * 1000);
107+
await sendOmniAsset(wallet, RECEIVE_ADDRESS, SEND_ADDRESS, BASE_AMOUNT, ASSET_ID, feeRate * 1000);
107108
}
108109

109110
main().catch((e) => {

0 commit comments

Comments
 (0)