diff --git a/cashtab/src/components/Common/Ticker.js b/cashtab/src/components/Common/Ticker.js --- a/cashtab/src/components/Common/Ticker.js +++ b/cashtab/src/components/Common/Ticker.js @@ -54,7 +54,7 @@ ], }, coingeckoId: 'ecash', - defaultFee: 2.01, + defaultFee: 1.01, dustSats: 550, etokenSats: 546, cashDecimals: 2, diff --git a/cashtab/src/utils/__tests__/cashMethods.test.js b/cashtab/src/utils/__tests__/cashMethods.test.js --- a/cashtab/src/utils/__tests__/cashMethods.test.js +++ b/cashtab/src/utils/__tests__/cashMethods.test.js @@ -372,7 +372,7 @@ utxolib.networks.ecash, ); const satoshisToSendInput = new BigNumber(2184); - const feeInSatsPerByte = currency.defaultFee; + const feeInSatsPerByte = 2.01; // mock tx input const inputObj = generateTxInput( @@ -433,7 +433,7 @@ 'ecash:qzvydd4n3lm3xv62cx078nu9rg0e3srmqq0knykfed,3000', ]; const satoshisToSendInput = new BigNumber(900000); - const feeInSatsPerByte = currency.defaultFee; + const feeInSatsPerByte = 2.01; // mock tx input const inputObj = generateTxInput( @@ -878,7 +878,7 @@ null, // no slpUtxos used for genesis tx tokenId, null, // no token send/burn amount for genesis tx - currency.defaultFee, + 2.01, txBuilder, ); @@ -903,7 +903,7 @@ mockSlpUtxos, tokenId, new BigNumber(500), // sending 500 of these tokens - currency.defaultFee, + 2.01, txBuilder, ); @@ -930,7 +930,7 @@ mockSlpUtxos, tokenId, new BigNumber(500), // burning 500 of these tokens - currency.defaultFee, + 2.01, txBuilder, ); @@ -1021,7 +1021,7 @@ ); const destinationAddressAndValueArray = null; const satoshisToSend = new BigNumber(2184); - const feeInSatsPerByte = currency.defaultFee; + const feeInSatsPerByte = 2.01; const inputObj = generateTxInput( isOneToMany, @@ -1049,7 +1049,7 @@ 'ecash:qzvydd4n3lm3xv62cx078nu9rg0e3srmqq0knykfed,3000', ]; const satoshisToSend = new BigNumber(900000); - const feeInSatsPerByte = currency.defaultFee; + const feeInSatsPerByte = 2.01; const inputObj = generateTxInput( isOneToMany, @@ -1073,7 +1073,7 @@ ); const destinationAddressAndValueArray = null; // invalid since isOneToMany is true const satoshisToSend = new BigNumber(900000); - const feeInSatsPerByte = currency.defaultFee; + const feeInSatsPerByte = 2.01; let thrownError; try { @@ -1103,7 +1103,7 @@ 'ecash:qzvydd4n3lm3xv62cx078nu9rg0e3srmqq0knykfed,3000', ]; const satoshisToSend = new BigNumber(900000); - const feeInSatsPerByte = currency.defaultFee; + const feeInSatsPerByte = 2.01; let thrownError; try { @@ -1870,7 +1870,7 @@ }); it('calculates fee correctly for 2 P2PKH outputs', () => { const utxosMock = [{}, {}]; - expect(calcFee(utxosMock, 2, currency.defaultFee)).toBe(752); + expect(calcFee(utxosMock, 2, 2.01)).toBe(752); }); it(`Converts a hash160 to an ecash address`, () => { expect( diff --git a/cashtab/src/utils/__tests__/transactions.test.js b/cashtab/src/utils/__tests__/transactions.test.js --- a/cashtab/src/utils/__tests__/transactions.test.js +++ b/cashtab/src/utils/__tests__/transactions.test.js @@ -35,7 +35,7 @@ chronik, wallet, utxos, - currency.defaultFee, + 2.01, '', false, null, @@ -62,7 +62,7 @@ chronik, wallet, utxos, - currency.defaultFee, + 2.01, 'This is an encrypted opreturn message', false, null, @@ -97,7 +97,7 @@ chronik, wallet, utxos, - currency.defaultFee, + 2.01, '', true, addressAndValueArray, @@ -126,7 +126,7 @@ await registerNewAlias( chronik, aliasRegisteringWallet, - currency.defaultFee, + 2.01, 'newtest1', 'ecash:qqswmjpcjyq6a5syh8qhklty5q826r5vlsh7a7uqtq', 551, @@ -153,7 +153,7 @@ await registerNewAlias( chronik, aliasRegisteringWalletAfterTx, - currency.defaultFee, + 2.01, 'twentyonebytealiasreg', 'ecash:qqswmjpcjyq6a5syh8qhklty5q826r5vlsh7a7uqtq', 551, @@ -180,7 +180,7 @@ await registerNewAlias( chronik, aliasRegisteringWalletAfterTwoTxs, - currency.defaultFee, + 2.01, 'whynotthreetests', 'ecash:qqswmjpcjyq6a5syh8qhklty5q826r5vlsh7a7uqtq', 551, @@ -216,7 +216,7 @@ chronik, wallet, utxos, - currency.defaultFee, + 2.01, '', false, null, @@ -232,7 +232,7 @@ chronik, wallet, utxos, - currency.defaultFee, + 2.01, '', false, null, @@ -254,7 +254,7 @@ chronik, wallet, utxos, - currency.defaultFee, + 2.01, '', false, null, @@ -300,7 +300,7 @@ chronik, wallet, utxos, - currency.defaultFee, + 2.01, '', false, null, @@ -318,7 +318,7 @@ chronik, wallet, utxos, - currency.defaultFee, + 2.01, '', false, null, @@ -336,7 +336,7 @@ chronik, wallet, utxos, - currency.defaultFee, + 2.01, '', false, null, @@ -356,7 +356,7 @@ chronik, wallet, utxos, - currency.defaultFee, + 2.01, '', false, null, @@ -391,7 +391,7 @@ const invalidWalletTokenCreation = createToken( chronik, invalidWallet, - currency.defaultFee, + 2.01, configObj, ); await expect(invalidWalletTokenCreation).rejects.toThrow(