@dappworks/kit 0.5.9 → 0.5.10
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.
|
@@ -39624,14 +39624,23 @@ var GlobalLedgerProvider = ObjectPool.get("provider", async () => {
|
|
|
39624
39624
|
return new ethers_exports.providers.JsonRpcProvider("https://babel-api.mainnet.iotex.io");
|
|
39625
39625
|
});
|
|
39626
39626
|
var GlobalLedgerSigner = ObjectPool.get("signer", async () => {
|
|
39627
|
-
|
|
39628
|
-
|
|
39627
|
+
try {
|
|
39628
|
+
const transport = await createTransport();
|
|
39629
|
+
return new LedgerSigner(transport, await GlobalLedgerProvider, "44'/304'/0'/0/0");
|
|
39630
|
+
} catch (error) {
|
|
39631
|
+
return null;
|
|
39632
|
+
}
|
|
39629
39633
|
});
|
|
39630
39634
|
var ConnectLedger = async () => {
|
|
39631
39635
|
RootStore.Get(WalletStore).isLedger = true;
|
|
39632
39636
|
const signer = await GlobalLedgerSigner;
|
|
39637
|
+
if (!signer) {
|
|
39638
|
+
RootStore.Get(ToastPlugin).error("Failed to connect to Ledger");
|
|
39639
|
+
RootStore.Get(WalletStore).isLedger = false;
|
|
39640
|
+
return null;
|
|
39641
|
+
}
|
|
39633
39642
|
const interval = setInterval(async () => {
|
|
39634
|
-
const address = await signer.getAddress();
|
|
39643
|
+
const address = await (signer == null ? void 0 : signer.getAddress());
|
|
39635
39644
|
if (address) {
|
|
39636
39645
|
RootStore.Get(WalletStore).set({
|
|
39637
39646
|
account: address,
|
|
@@ -40244,4 +40253,4 @@ js-sha3/src/sha3.js:
|
|
|
40244
40253
|
|
|
40245
40254
|
export { AppProvider, AutoMan, BigNumberInputState, BigNumberState, ConnectLedger, DisconnectLedger, ObjectPool, PromiseHook, StorageListState, StorageState, WalletConfigStore, WalletHistoryStore, WalletRpcStore, WalletStore };
|
|
40246
40255
|
//# sourceMappingURL=out.js.map
|
|
40247
|
-
//# sourceMappingURL=chunk-
|
|
40256
|
+
//# sourceMappingURL=chunk-C32A7YQN.mjs.map
|