@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/README.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -2635,13 +2635,23 @@ class KMDWalletClient extends BaseClient {
|
|
|
2635
2635
|
return;
|
|
2636
2636
|
}
|
|
2637
2637
|
// Not to be signed by our signer, skip it
|
|
2638
|
-
else
|
|
2639
|
-
|
|
2638
|
+
else {
|
|
2639
|
+
const senderAddress = this.algosdk.encodeAddress(dtxn.snd);
|
|
2640
|
+
const rekeyAddress = dtxn.rekey ? this.algosdk.encodeAddress(dtxn.rekey) : null;
|
|
2641
|
+
const isSignerConnected = rekeyAddress
|
|
2642
|
+
? connectedAccounts.includes(rekeyAddress) && connectedAccounts.includes(senderAddress)
|
|
2643
|
+
: connectedAccounts.includes(senderAddress);
|
|
2644
|
+
if (!isSignerConnected) {
|
|
2645
|
+
return;
|
|
2646
|
+
}
|
|
2640
2647
|
}
|
|
2641
2648
|
// overwrite with an empty blob
|
|
2642
2649
|
signedTxns[idx] = new Uint8Array();
|
|
2643
2650
|
const txn = this.algosdk.Transaction.from_obj_for_encoding(dtxn);
|
|
2644
|
-
|
|
2651
|
+
const promise = txn.reKeyTo
|
|
2652
|
+
? this.#client.signTransactionWithSpecificPublicKey(token, pw, txn, txn.reKeyTo.publicKey)
|
|
2653
|
+
: this.#client.signTransaction(token, pw, txn);
|
|
2654
|
+
signingPromises.push(promise);
|
|
2645
2655
|
});
|
|
2646
2656
|
const signingResults = await Promise.all(signingPromises);
|
|
2647
2657
|
// Restore the newly signed txns in the correct order
|