Fix OneWallet compatibility for nonces returned as numbers instead of hex

pull/70/head
Sebastian Johnsson 4 years ago
parent a60117ceac
commit 99bd7ad3d5
  1. 2
      packages/harmony-core/src/harmonyExtension.ts

@ -182,7 +182,7 @@ export class HarmonyExtension {
transaction.setParams({
...transaction.txParams,
from: crypto.getAddress(extensionAccount.address).bech32,
nonce: Number.parseInt(utils.hexToNumber(nonce.result), 10),
nonce: Number.parseInt(utils.isHex(nonce.result.toString()) ? utils.hexToNumber(nonce.result.toString()) : nonce.result.toString(), 10),
});
} else {
transaction.setParams({

Loading…
Cancel
Save