@txnlab/use-wallet 2.2.0 → 2.3.0
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/README.md +1 -1
- package/dist/cjs/index.js +13 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +13 -3
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -2633,13 +2633,23 @@ class KMDWalletClient extends BaseClient {
|
|
|
2633
2633
|
return;
|
|
2634
2634
|
}
|
|
2635
2635
|
// Not to be signed by our signer, skip it
|
|
2636
|
-
else
|
|
2637
|
-
|
|
2636
|
+
else {
|
|
2637
|
+
const senderAddress = this.algosdk.encodeAddress(dtxn.snd);
|
|
2638
|
+
const rekeyAddress = dtxn.rekey ? this.algosdk.encodeAddress(dtxn.rekey) : null;
|
|
2639
|
+
const isSignerConnected = rekeyAddress
|
|
2640
|
+
? connectedAccounts.includes(rekeyAddress) && connectedAccounts.includes(senderAddress)
|
|
2641
|
+
: connectedAccounts.includes(senderAddress);
|
|
2642
|
+
if (!isSignerConnected) {
|
|
2643
|
+
return;
|
|
2644
|
+
}
|
|
2638
2645
|
}
|
|
2639
2646
|
// overwrite with an empty blob
|
|
2640
2647
|
signedTxns[idx] = new Uint8Array();
|
|
2641
2648
|
const txn = this.algosdk.Transaction.from_obj_for_encoding(dtxn);
|
|
2642
|
-
|
|
2649
|
+
const promise = txn.reKeyTo
|
|
2650
|
+
? this.#client.signTransactionWithSpecificPublicKey(token, pw, txn, txn.reKeyTo.publicKey)
|
|
2651
|
+
: this.#client.signTransaction(token, pw, txn);
|
|
2652
|
+
signingPromises.push(promise);
|
|
2643
2653
|
});
|
|
2644
2654
|
const signingResults = await Promise.all(signingPromises);
|
|
2645
2655
|
// Restore the newly signed txns in the correct order
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"url": "https://github.com/txnlab/use-wallet/issues"
|
|
13
13
|
},
|
|
14
14
|
"homepage": "https://txnlab.github.io/use-wallet",
|
|
15
|
-
"version": "2.
|
|
15
|
+
"version": "2.3.0",
|
|
16
16
|
"description": "React hooks for using Algorand compatible wallets in dApps.",
|
|
17
17
|
"scripts": {
|
|
18
18
|
"dev": "yarn storybook",
|