hodl-wallet 1.3.2 → 1.3.4
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/index.mjs +5 -5
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -323,10 +323,10 @@ class Wallet {
|
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
const receipt = await this.web3.eth.sendSignedTransaction(signedTx.rawTransaction);
|
|
326
|
-
this.displayTransactionResult(address, token, amount, receipt);
|
|
326
|
+
this.displayTransactionResult(address, token, amount, receipt.transactionHash);
|
|
327
327
|
|
|
328
328
|
// Add transaction to history
|
|
329
|
-
this.addToTransactions(address, token, amount, receipt);
|
|
329
|
+
this.addToTransactions(address, token, amount, receipt.transactionHash);
|
|
330
330
|
|
|
331
331
|
if (!addressBook.some(entry => entry.address === address)) {
|
|
332
332
|
await this.addToAddressBook(address);
|
|
@@ -367,13 +367,13 @@ class Wallet {
|
|
|
367
367
|
}).replace(/(\d{2})\/(\d{2})\/(\d{4})/, '$3-$2-$1').replace(",", "");
|
|
368
368
|
}
|
|
369
369
|
|
|
370
|
-
addToTransactions(recipient, token, amount,
|
|
370
|
+
addToTransactions(recipient, token, amount, hash) {
|
|
371
371
|
const transaction = {
|
|
372
372
|
timestamp: new Date().toISOString(),
|
|
373
373
|
recipient,
|
|
374
374
|
token,
|
|
375
375
|
amount,
|
|
376
|
-
hash
|
|
376
|
+
hash
|
|
377
377
|
};
|
|
378
378
|
this.db.add('transactions', this.account.address, this.selectedNetwork.nativeToken, transaction);
|
|
379
379
|
}
|
|
@@ -516,7 +516,7 @@ class Wallet {
|
|
|
516
516
|
date,
|
|
517
517
|
address,
|
|
518
518
|
token,
|
|
519
|
-
amount.toFixed(3)
|
|
519
|
+
parseFloat(amount).toFixed(3)
|
|
520
520
|
]);
|
|
521
521
|
table.push([{ colSpan: 4, content: this.selectedNetwork.explorer + hash }]);
|
|
522
522
|
|