@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.
- package/dist/BSEthereum.js +8 -3
- package/package.json +1 -1
package/dist/BSEthereum.js
CHANGED
|
@@ -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
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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;
|