@harmony-js/account
Advanced tools
Comparing version 0.1.28 to 0.1.29
@@ -246,6 +246,10 @@ "use strict"; | ||
shardNonce = shardBalanceObject.nonce; | ||
transaction.setParams(tslib_1.__assign(tslib_1.__assign({}, transaction.txParams), { from: this.checksumAddress || '0x', nonce: shardNonce })); | ||
transaction.setParams(tslib_1.__assign(tslib_1.__assign({}, transaction.txParams), { from: this.messenger.chainPrefix === "hmy" /* Harmony */ | ||
? this.bech32Address | ||
: this.checksumAddress || '0x', nonce: shardNonce })); | ||
} | ||
else { | ||
transaction.setParams(tslib_1.__assign(tslib_1.__assign({}, transaction.txParams), { from: this.checksumAddress || '0x', nonce: 0 })); | ||
transaction.setParams(tslib_1.__assign(tslib_1.__assign({}, transaction.txParams), { from: this.messenger.chainPrefix === "hmy" /* Harmony */ | ||
? this.bech32Address | ||
: this.checksumAddress || '0x', nonce: 0 })); | ||
} | ||
@@ -257,3 +261,6 @@ _b.label = 2; | ||
return [2 /*return*/, transaction.map(function (obj) { | ||
return tslib_1.__assign(tslib_1.__assign({}, obj), { signature: signature_1, rawTransaction: rawTransaction_1, from: _this.checksumAddress }); | ||
return tslib_1.__assign(tslib_1.__assign({}, obj), { signature: signature_1, | ||
rawTransaction: rawTransaction_1, from: _this.messenger.chainPrefix === "hmy" /* Harmony */ | ||
? _this.bech32Address | ||
: _this.checksumAddress || '0x' }); | ||
})]; | ||
@@ -260,0 +267,0 @@ } |
@@ -351,6 +351,10 @@ /** | ||
shardNonce = shardBalanceObject.nonce; | ||
transaction$$1.setParams(__assign(__assign({}, transaction$$1.txParams), { from: this.checksumAddress || '0x', nonce: shardNonce })); | ||
transaction$$1.setParams(__assign(__assign({}, transaction$$1.txParams), { from: this.messenger.chainPrefix === "hmy" /* Harmony */ | ||
? this.bech32Address | ||
: this.checksumAddress || '0x', nonce: shardNonce })); | ||
} | ||
else { | ||
transaction$$1.setParams(__assign(__assign({}, transaction$$1.txParams), { from: this.checksumAddress || '0x', nonce: 0 })); | ||
transaction$$1.setParams(__assign(__assign({}, transaction$$1.txParams), { from: this.messenger.chainPrefix === "hmy" /* Harmony */ | ||
? this.bech32Address | ||
: this.checksumAddress || '0x', nonce: 0 })); | ||
} | ||
@@ -362,3 +366,6 @@ _b.label = 2; | ||
return [2 /*return*/, transaction$$1.map(function (obj) { | ||
return __assign(__assign({}, obj), { signature: signature_1, rawTransaction: rawTransaction_1, from: _this.checksumAddress }); | ||
return __assign(__assign({}, obj), { signature: signature_1, | ||
rawTransaction: rawTransaction_1, from: _this.messenger.chainPrefix === "hmy" /* Harmony */ | ||
? _this.bech32Address | ||
: _this.checksumAddress || '0x' }); | ||
})]; | ||
@@ -365,0 +372,0 @@ } |
@@ -347,6 +347,10 @@ /** | ||
shardNonce = shardBalanceObject.nonce; | ||
transaction.setParams(__assign(__assign({}, transaction.txParams), { from: this.checksumAddress || '0x', nonce: shardNonce })); | ||
transaction.setParams(__assign(__assign({}, transaction.txParams), { from: this.messenger.chainPrefix === "hmy" /* Harmony */ | ||
? this.bech32Address | ||
: this.checksumAddress || '0x', nonce: shardNonce })); | ||
} | ||
else { | ||
transaction.setParams(__assign(__assign({}, transaction.txParams), { from: this.checksumAddress || '0x', nonce: 0 })); | ||
transaction.setParams(__assign(__assign({}, transaction.txParams), { from: this.messenger.chainPrefix === "hmy" /* Harmony */ | ||
? this.bech32Address | ||
: this.checksumAddress || '0x', nonce: 0 })); | ||
} | ||
@@ -358,3 +362,6 @@ _b.label = 2; | ||
return [2 /*return*/, transaction.map(function (obj) { | ||
return __assign(__assign({}, obj), { signature: signature_1, rawTransaction: rawTransaction_1, from: _this.checksumAddress }); | ||
return __assign(__assign({}, obj), { signature: signature_1, | ||
rawTransaction: rawTransaction_1, from: _this.messenger.chainPrefix === "hmy" /* Harmony */ | ||
? _this.bech32Address | ||
: _this.checksumAddress || '0x' }); | ||
})]; | ||
@@ -361,0 +368,0 @@ } |
@@ -348,6 +348,10 @@ /** | ||
shardNonce = shardBalanceObject.nonce; | ||
transaction$$1.setParams(__assign(__assign({}, transaction$$1.txParams), { from: this.checksumAddress || '0x', nonce: shardNonce })); | ||
transaction$$1.setParams(__assign(__assign({}, transaction$$1.txParams), { from: this.messenger.chainPrefix === "hmy" /* Harmony */ | ||
? this.bech32Address | ||
: this.checksumAddress || '0x', nonce: shardNonce })); | ||
} | ||
else { | ||
transaction$$1.setParams(__assign(__assign({}, transaction$$1.txParams), { from: this.checksumAddress || '0x', nonce: 0 })); | ||
transaction$$1.setParams(__assign(__assign({}, transaction$$1.txParams), { from: this.messenger.chainPrefix === "hmy" /* Harmony */ | ||
? this.bech32Address | ||
: this.checksumAddress || '0x', nonce: 0 })); | ||
} | ||
@@ -359,3 +363,6 @@ _b.label = 2; | ||
return [2 /*return*/, transaction$$1.map(function (obj) { | ||
return __assign(__assign({}, obj), { signature: signature_1, rawTransaction: rawTransaction_1, from: _this.checksumAddress }); | ||
return __assign(__assign({}, obj), { signature: signature_1, | ||
rawTransaction: rawTransaction_1, from: _this.messenger.chainPrefix === "hmy" /* Harmony */ | ||
? _this.bech32Address | ||
: _this.checksumAddress || '0x' }); | ||
})]; | ||
@@ -362,0 +369,0 @@ } |
{ | ||
"name": "@harmony-js/account", | ||
"version": "0.1.28", | ||
"version": "0.1.29", | ||
"description": "account and wallet for harmony", | ||
@@ -21,9 +21,9 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@harmony-js/core": "0.1.28", | ||
"@harmony-js/core": "0.1.29", | ||
"@harmony-js/crypto": "0.1.28", | ||
"@harmony-js/network": "0.1.28", | ||
"@harmony-js/transaction": "0.1.28", | ||
"@harmony-js/network": "0.1.29", | ||
"@harmony-js/transaction": "0.1.29", | ||
"@harmony-js/utils": "0.1.28" | ||
}, | ||
"gitHead": "1ccc7071aee39a4597caa1019c36104420499af9" | ||
"gitHead": "2e3bd054b8a87030574b20397cc73256b264feef" | ||
} |
@@ -14,3 +14,9 @@ import { | ||
import { isPrivateKey, add0xToString, hexToNumber, AddressSuffix } from '@harmony-js/utils'; | ||
import { | ||
isPrivateKey, | ||
add0xToString, | ||
hexToNumber, | ||
AddressSuffix, | ||
ChainType, | ||
} from '@harmony-js/utils'; | ||
import { Transaction, RLPSign } from '@harmony-js/transaction'; | ||
@@ -201,3 +207,6 @@ import { Messenger, RPCMethod } from '@harmony-js/network'; | ||
...transaction.txParams, | ||
from: this.checksumAddress || '0x', | ||
from: | ||
this.messenger.chainPrefix === ChainType.Harmony | ||
? this.bech32Address | ||
: this.checksumAddress || '0x', | ||
nonce: shardNonce, | ||
@@ -208,3 +217,6 @@ }); | ||
...transaction.txParams, | ||
from: this.checksumAddress || '0x', | ||
from: | ||
this.messenger.chainPrefix === ChainType.Harmony | ||
? this.bech32Address | ||
: this.checksumAddress || '0x', | ||
nonce: 0, | ||
@@ -221,3 +233,11 @@ }); | ||
return transaction.map((obj: any) => { | ||
return { ...obj, signature, rawTransaction, from: this.checksumAddress }; | ||
return { | ||
...obj, | ||
signature, | ||
rawTransaction, | ||
from: | ||
this.messenger.chainPrefix === ChainType.Harmony | ||
? this.bech32Address | ||
: this.checksumAddress || '0x', | ||
}; | ||
}); | ||
@@ -224,0 +244,0 @@ } else { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
435459
5025
+ Added@harmony-js/contract@0.1.29(transitive)
+ Added@harmony-js/core@0.1.29(transitive)
+ Added@harmony-js/network@0.1.29(transitive)
+ Added@harmony-js/transaction@0.1.29(transitive)
- Removed@harmony-js/contract@0.1.28(transitive)
- Removed@harmony-js/core@0.1.28(transitive)
- Removed@harmony-js/network@0.1.28(transitive)
- Removed@harmony-js/transaction@0.1.28(transitive)
Updated@harmony-js/core@0.1.29
Updated@harmony-js/network@0.1.29