@cityofzion/bs-ethereum 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -144,9 +144,14 @@ class BSEthereum {
144
144
  throw new Error('You must provide getLedgerTransport function to use Ledger');
145
145
  ledgerTransport = yield this.ledgerService.getLedgerTransport(param.senderAccount);
146
146
  }
147
- const signTransactionFunction = ledgerTransport
148
- ? yield this.ledgerService.getSignTransactionFunction(ledgerTransport)
149
- : new ethers_1.ethers.Wallet(param.senderAccount.key, provider).signTransaction;
147
+ let signTransactionFunction;
148
+ if (ledgerTransport) {
149
+ signTransactionFunction = yield this.ledgerService.getSignTransactionFunction(ledgerTransport);
150
+ }
151
+ else {
152
+ const wallet = new ethers_1.ethers.Wallet(param.senderAccount.key, provider);
153
+ signTransactionFunction = wallet.signTransaction.bind(wallet);
154
+ }
150
155
  const decimals = (_a = param.intent.tokenDecimals) !== null && _a !== void 0 ? _a : 18;
151
156
  const amount = ethersBigNumber.parseFixed(param.intent.amount, decimals);
152
157
  let transactionParams;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cityofzion/bs-ethereum",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "repository": "https://github.com/CityOfZion/blockchain-services",