From 048fa4c2dc11a5514147d8407c61864829230f49 Mon Sep 17 00:00:00 2001 From: lukerhoads Date: Wed, 18 Aug 2021 11:39:55 -0500 Subject: [PATCH 1/6] Removed dup check in address test --- packages/bitcore-lib/test/address.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/bitcore-lib/test/address.js b/packages/bitcore-lib/test/address.js index 3f34ce22992..a4f2d5db357 100644 --- a/packages/bitcore-lib/test/address.js +++ b/packages/bitcore-lib/test/address.js @@ -245,7 +245,6 @@ describe('Address', function() { it('should make an address from a buffer', function() { Address.fromBuffer(buf).toString().should.equal(str); new Address(buf).toString().should.equal(str); - new Address(buf).toString().should.equal(str); }); it('should make an address from a string', function() { From a34e5019996af9d808f42af3e1b028dd65832d46 Mon Sep 17 00:00:00 2001 From: Kenny Joseph Date: Fri, 30 Jul 2021 11:48:46 -0400 Subject: [PATCH 2/6] Update LTC default fee levels --- .../src/lib/common/defaults.ts | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/packages/bitcore-wallet-service/src/lib/common/defaults.ts b/packages/bitcore-wallet-service/src/lib/common/defaults.ts index 6ffa1da1443..0259a3df283 100644 --- a/packages/bitcore-wallet-service/src/lib/common/defaults.ts +++ b/packages/bitcore-wallet-service/src/lib/common/defaults.ts @@ -99,9 +99,29 @@ module.exports = { ], ltc: [ { - name: 'normal', - nbBlocks: 2, - defaultValue: 1000 + level: 'urgent', + feePerKb: 150000, + nbBlocks: 2 + }, + { + level: 'priority', + feePerKb: 100000, + nbBlocks: 2 + }, + { + level: 'normal', + feePerKb: 100000, + nbBlocks: 3 + }, + { + level: 'economy', + feePerKb: 10000, + nbBlocks: 6 + }, + { + level: 'superEconomy', + feePerKb: 10000, + nbBlocks: 24 } ] }, From 20d12a5054e4addeea235f864f1091402c32d601 Mon Sep 17 00:00:00 2001 From: Kenny Joseph Date: Fri, 30 Jul 2021 12:39:38 -0400 Subject: [PATCH 3/6] Copy n paste whoes --- .../src/lib/common/defaults.ts | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/bitcore-wallet-service/src/lib/common/defaults.ts b/packages/bitcore-wallet-service/src/lib/common/defaults.ts index 0259a3df283..fa0455c9925 100644 --- a/packages/bitcore-wallet-service/src/lib/common/defaults.ts +++ b/packages/bitcore-wallet-service/src/lib/common/defaults.ts @@ -99,29 +99,29 @@ module.exports = { ], ltc: [ { - level: 'urgent', - feePerKb: 150000, - nbBlocks: 2 + name: 'urgent', + nbBlocks: 2, + defaultValue: 150000 }, { - level: 'priority', - feePerKb: 100000, - nbBlocks: 2 + name: 'priority', + nbBlocks: 2, + defaultValue: 100000 }, { - level: 'normal', - feePerKb: 100000, - nbBlocks: 3 + name: 'normal', + nbBlocks: 3, + defaultValue: 100000 }, { - level: 'economy', - feePerKb: 10000, - nbBlocks: 6 + name: 'economy', + nbBlocks: 6, + defaultValue: 10000 }, { - level: 'superEconomy', - feePerKb: 10000, - nbBlocks: 24 + name: 'superEconomy', + nbBlocks: 24, + defaultValue: 10000 } ] }, From dbc193be2b7b50b9df1b12060c05518f24b9efa9 Mon Sep 17 00:00:00 2001 From: lukerhoads Date: Wed, 18 Aug 2021 11:39:55 -0500 Subject: [PATCH 4/6] Removed dup check in address test --- packages/bitcore-lib/test/address.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/bitcore-lib/test/address.js b/packages/bitcore-lib/test/address.js index 3f34ce22992..a4f2d5db357 100644 --- a/packages/bitcore-lib/test/address.js +++ b/packages/bitcore-lib/test/address.js @@ -245,7 +245,6 @@ describe('Address', function() { it('should make an address from a buffer', function() { Address.fromBuffer(buf).toString().should.equal(str); new Address(buf).toString().should.equal(str); - new Address(buf).toString().should.equal(str); }); it('should make an address from a string', function() { From 5f28c5e71fa5ce38c0ce7acdbb37c9f77bcf5126 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 18 Aug 2021 12:59:53 -0400 Subject: [PATCH 5/6] [FIX] XRP tx create --- packages/bitcore-wallet-client/src/lib/common/utils.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/bitcore-wallet-client/src/lib/common/utils.ts b/packages/bitcore-wallet-client/src/lib/common/utils.ts index 1cfade793dd..f76b60a1931 100644 --- a/packages/bitcore-wallet-client/src/lib/common/utils.ts +++ b/packages/bitcore-wallet-client/src/lib/common/utils.ts @@ -409,6 +409,7 @@ export class Utils { return t; } else { + // ETH ERC20 XRP const { data, destinationTag, @@ -434,8 +435,13 @@ export class Utils { // If it is a token swap its an already created ERC20 transaction so we skip it and go directly to ETH transaction create const isERC20 = tokenAddress && !payProUrl && !isTokenSwap; const isETHMULTISIG = multisigContractAddress; - // using ETH as default since getChain returns undefined for custom tokens - const chain = isETHMULTISIG ? 'ETHMULTISIG' : isERC20 ? 'ERC20' : 'ETH'; + const chain = isETHMULTISIG + ? 'ETHMULTISIG' + : isERC20 + ? 'ERC20' + : txp.chain + ? txp.chain.toUpperCase() + : this.getChain(coin); for (let index = 0; index < recipients.length; index++) { const rawTx = Transactions.create({ ...txp, From a73c518a05b590614bc900643e17998ec6cab768 Mon Sep 17 00:00:00 2001 From: lukerhoads Date: Fri, 20 Aug 2021 16:52:05 -0500 Subject: [PATCH 6/6] Fix address questions dup --- packages/bitcore-lib/test/address.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/bitcore-lib/test/address.js b/packages/bitcore-lib/test/address.js index a4f2d5db357..6582eb72a1d 100644 --- a/packages/bitcore-lib/test/address.js +++ b/packages/bitcore-lib/test/address.js @@ -508,14 +508,14 @@ describe('Address', function() { it('should detect a P2SH address', function() { new Address(P2SHLivenet[0]).isPayToScriptHash().should.equal(true); new Address(P2SHLivenet[0]).isPayToPublicKeyHash().should.equal(false); - new Address(P2SHTestnet[0]).isPayToScriptHash().should.equal(true); - new Address(P2SHTestnet[0]).isPayToPublicKeyHash().should.equal(false); + new Address(P2SHTestnet[0]).isPayToWitnessScriptHash().should.equal(false); + new Address(P2SHTestnet[0]).isPayToWitnessPublicKeyHash().should.equal(false); }); it('should detect a Pay To PubkeyHash address', function() { new Address(PKHLivenet[0]).isPayToPublicKeyHash().should.equal(true); new Address(PKHLivenet[0]).isPayToScriptHash().should.equal(false); - new Address(PKHTestnet[0]).isPayToPublicKeyHash().should.equal(true); - new Address(PKHTestnet[0]).isPayToScriptHash().should.equal(false); + new Address(PKHTestnet[0]).isPayToWitnessScriptHash().should.equal(false); + new Address(PKHTestnet[0]).isPayToWitnessPublicKeyHash().should.equal(false); }); });