@reown/appkit-cdn 1.0.3 → 1.0.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/dist/{W3MFrameProviderSingleton-CRF_1us_.js → W3MFrameProviderSingleton-ByMR2if0.js} +103 -124
- package/dist/{W3MFrameProviderSingleton-EQdqCGSY.cjs → W3MFrameProviderSingleton-QMvIDuQ9.cjs} +5 -5
- package/dist/ethers.cjs +1 -1
- package/dist/ethers.js +4 -4
- package/dist/{hooks.module-Dv1obaBy.cjs → hooks.module-B7uJtWgK.cjs} +1 -1
- package/dist/{hooks.module-Bo49CUkD.js → hooks.module-Cc8hySTP.js} +1 -1
- package/dist/{index-hXCH-znD.js → index-6X8YJouh.js} +2 -2
- package/dist/{index-C2gFFabd.js → index-BORWocQH.js} +2 -2
- package/dist/{index-CLxU5hsA.cjs → index-BY9wdxgf.cjs} +1 -1
- package/dist/{index-ByE-R0E1.js → index-BeyRJQ4w.js} +2 -2
- package/dist/{index-CKVZVFq_.cjs → index-BxUpvuxL.cjs} +1 -1
- package/dist/{index-CcTeiaz4.cjs → index-C8qz9kCY.cjs} +1 -1
- package/dist/{index-DVFjsAEF.js → index-CVwzlj-7.js} +2 -2
- package/dist/{index-CQRSLm_m.js → index-Cvq37YY6.js} +1 -1
- package/dist/{index-CeQNoxrU.cjs → index-D2X0Qm-3.cjs} +1 -1
- package/dist/{index-CHb2nMaf.js → index-D2zHP4xy.js} +2 -2
- package/dist/{index-h3CAtOy2.cjs → index-D5Be_LRa.cjs} +1 -1
- package/dist/{index-DH3qaBPp.cjs → index-DGKRDdTn.cjs} +1 -1
- package/dist/{index-DwRBfwIO.cjs → index-DS2tCoxB.cjs} +1 -1
- package/dist/{index-BuOJ8QNL.cjs → index-DatS1o_D.cjs} +1 -1
- package/dist/{index-CG2NGIOC.js → index-Ds2LQQcC.js} +2 -2
- package/dist/{index-B4aMSR4c.js → index-RP8m5fY-.js} +2 -2
- package/dist/{index.es-DnJzv0Jm.cjs → index.es-DEYcd29M.cjs} +2 -2
- package/dist/{index.es-bcU603NI.js → index.es-gcREdjR5.js} +2 -2
- package/dist/{metamask-sdk-my5l20D3.cjs → metamask-sdk-B7mRWuUL.cjs} +1 -1
- package/dist/{metamask-sdk-CXJHRcL2.js → metamask-sdk-DjTXJOf3.js} +1 -1
- package/dist/{native-CAgUwsyb.js → native-BIxNbjgj.js} +1 -1
- package/dist/{native-AlGArcwp.cjs → native-GRAmon80.cjs} +1 -1
- package/dist/{w3m-modal-BNjtW4Kj.js → w3m-modal-B3w1zQhA.js} +4 -4
- package/dist/{w3m-modal-BC3zgDJa.cjs → w3m-modal-DhxUNld7.cjs} +3 -3
- package/dist/{wagmi-BSo7cFxV.js → wagmi-B6jaEzaj.js} +13 -13
- package/dist/{wagmi-D-vZdxZZ.cjs → wagmi-Dtm-jEDI.cjs} +4 -4
- package/dist/wagmi.cjs +1 -1
- package/dist/wagmi.js +2 -2
- package/package.json +5 -5
package/dist/{W3MFrameProviderSingleton-CRF_1us_.js → W3MFrameProviderSingleton-ByMR2if0.js}
RENAMED
|
@@ -2728,7 +2728,7 @@ const NumberUtil = {
|
|
|
2728
2728
|
CONNECTED_SOCIAL: "@appkit/connected_social",
|
|
2729
2729
|
CONNECTED_SOCIAL_USERNAME: "@appkit/connected_social_username",
|
|
2730
2730
|
RECENT_WALLETS: "@appkit/recent_wallets",
|
|
2731
|
-
DEEPLINK_CHOICE: "
|
|
2731
|
+
DEEPLINK_CHOICE: "WALLETCONNECT_DEEPLINK_CHOICE"
|
|
2732
2732
|
}, SafeLocalStorage = {
|
|
2733
2733
|
setItem(Me, H) {
|
|
2734
2734
|
isSafe() && localStorage.setItem(Me, H);
|
|
@@ -3379,8 +3379,8 @@ const state$m = proxy$1({
|
|
|
3379
3379
|
}), CoreHelperUtil.sortRequestedNetworks(J, Ne);
|
|
3380
3380
|
},
|
|
3381
3381
|
async switchActiveNetwork(Me) {
|
|
3382
|
-
const H = ChainController.getNetworkControllerClient();
|
|
3383
|
-
|
|
3382
|
+
const H = ChainController.getNetworkControllerClient(Me == null ? void 0 : Me.chainNamespace);
|
|
3383
|
+
H && await H.switchCaipNetwork(Me), ChainController.setActiveCaipNetwork(Me), Me && EventsController.sendEvent({
|
|
3384
3384
|
type: "track",
|
|
3385
3385
|
event: "SWITCH_NETWORK",
|
|
3386
3386
|
properties: { network: Me.id }
|
|
@@ -8314,77 +8314,24 @@ const state$h = proxy$1({
|
|
|
8314
8314
|
});
|
|
8315
8315
|
}
|
|
8316
8316
|
}, state$e = proxy$1({
|
|
8317
|
-
view: "Connect",
|
|
8318
|
-
history: ["Connect"],
|
|
8319
|
-
transactionStack: []
|
|
8320
|
-
}), RouterController = {
|
|
8321
|
-
state: state$e,
|
|
8322
|
-
subscribeKey(Me, H) {
|
|
8323
|
-
return subscribeKey$1(state$e, Me, H);
|
|
8324
|
-
},
|
|
8325
|
-
pushTransactionStack(Me) {
|
|
8326
|
-
state$e.transactionStack.push(Me);
|
|
8327
|
-
},
|
|
8328
|
-
popTransactionStack(Me) {
|
|
8329
|
-
var J, Ne;
|
|
8330
|
-
const H = state$e.transactionStack.pop();
|
|
8331
|
-
if (H)
|
|
8332
|
-
if (Me)
|
|
8333
|
-
this.goBack(), (J = H == null ? void 0 : H.onCancel) == null || J.call(H);
|
|
8334
|
-
else {
|
|
8335
|
-
if (H.goBack)
|
|
8336
|
-
this.goBack();
|
|
8337
|
-
else if (H.replace) {
|
|
8338
|
-
const Ue = state$e.history.indexOf("ConnectingSiwe");
|
|
8339
|
-
Ue > 0 ? this.goBackToIndex(Ue - 1) : (ModalController.close(), state$e.history = []);
|
|
8340
|
-
} else
|
|
8341
|
-
H.view && this.reset(H.view);
|
|
8342
|
-
(Ne = H == null ? void 0 : H.onSuccess) == null || Ne.call(H);
|
|
8343
|
-
}
|
|
8344
|
-
},
|
|
8345
|
-
push(Me, H) {
|
|
8346
|
-
Me !== state$e.view && (state$e.view = Me, state$e.history.push(Me), state$e.data = H);
|
|
8347
|
-
},
|
|
8348
|
-
reset(Me) {
|
|
8349
|
-
state$e.view = Me, state$e.history = [Me];
|
|
8350
|
-
},
|
|
8351
|
-
replace(Me, H) {
|
|
8352
|
-
state$e.history.at(-1) === Me || (state$e.view = Me, state$e.history[state$e.history.length - 1] = Me, state$e.data = H);
|
|
8353
|
-
},
|
|
8354
|
-
goBack() {
|
|
8355
|
-
if (state$e.history.length > 1) {
|
|
8356
|
-
state$e.history.pop();
|
|
8357
|
-
const [Me] = state$e.history.slice(-1);
|
|
8358
|
-
Me && (state$e.view = Me);
|
|
8359
|
-
} else
|
|
8360
|
-
ModalController.close();
|
|
8361
|
-
},
|
|
8362
|
-
goBackToIndex(Me) {
|
|
8363
|
-
if (state$e.history.length > 1) {
|
|
8364
|
-
state$e.history = state$e.history.slice(0, Me + 1);
|
|
8365
|
-
const [H] = state$e.history.slice(-1);
|
|
8366
|
-
H && (state$e.view = H);
|
|
8367
|
-
}
|
|
8368
|
-
}
|
|
8369
|
-
}, state$d = proxy$1({
|
|
8370
8317
|
wcError: !1,
|
|
8371
8318
|
buffering: !1,
|
|
8372
8319
|
status: "disconnected"
|
|
8373
8320
|
}), ConnectionController = {
|
|
8374
|
-
state: state$
|
|
8321
|
+
state: state$e,
|
|
8375
8322
|
subscribeKey(Me, H) {
|
|
8376
|
-
return subscribeKey$1(state$
|
|
8323
|
+
return subscribeKey$1(state$e, Me, H);
|
|
8377
8324
|
},
|
|
8378
8325
|
_getClient(Me) {
|
|
8379
8326
|
return ChainController.getConnectionControllerClient(Me);
|
|
8380
8327
|
},
|
|
8381
8328
|
setClient(Me) {
|
|
8382
|
-
state$
|
|
8329
|
+
state$e._client = ref$2(Me);
|
|
8383
8330
|
},
|
|
8384
8331
|
async connectWalletConnect() {
|
|
8385
8332
|
var Me, H, J, Ne;
|
|
8386
8333
|
StorageUtil.setConnectedConnector("WALLET_CONNECT"), await ((Ne = (J = (H = (Me = ChainController.state) == null ? void 0 : Me.universalAdapter) == null ? void 0 : H.connectionControllerClient) == null ? void 0 : J.connectWalletConnect) == null ? void 0 : Ne.call(J, (je) => {
|
|
8387
|
-
state$
|
|
8334
|
+
state$e.wcUri = je, state$e.wcPairingExpiry = CoreHelperUtil.getPairingExpiry();
|
|
8388
8335
|
}));
|
|
8389
8336
|
},
|
|
8390
8337
|
async connectExternal(Me, H, J = !0) {
|
|
@@ -8434,22 +8381,22 @@ const state$h = proxy$1({
|
|
|
8434
8381
|
return ((Ne = (J = this._getClient(H)).checkInstalled) == null ? void 0 : Ne.call(J, Me)) || !1;
|
|
8435
8382
|
},
|
|
8436
8383
|
resetWcConnection() {
|
|
8437
|
-
state$
|
|
8384
|
+
state$e.wcUri = void 0, state$e.wcPairingExpiry = void 0, state$e.wcLinking = void 0, state$e.recentWallet = void 0, TransactionsController.resetTransactions(), StorageUtil.deleteWalletConnectDeepLink();
|
|
8438
8385
|
},
|
|
8439
8386
|
setWcLinking(Me) {
|
|
8440
|
-
state$
|
|
8387
|
+
state$e.wcLinking = Me;
|
|
8441
8388
|
},
|
|
8442
8389
|
setWcError(Me) {
|
|
8443
|
-
state$
|
|
8390
|
+
state$e.wcError = Me, state$e.buffering = !1;
|
|
8444
8391
|
},
|
|
8445
8392
|
setRecentWallet(Me) {
|
|
8446
|
-
state$
|
|
8393
|
+
state$e.recentWallet = Me;
|
|
8447
8394
|
},
|
|
8448
8395
|
setBuffering(Me) {
|
|
8449
|
-
state$
|
|
8396
|
+
state$e.buffering = Me;
|
|
8450
8397
|
},
|
|
8451
8398
|
setStatus(Me) {
|
|
8452
|
-
state$
|
|
8399
|
+
state$e.status = Me;
|
|
8453
8400
|
},
|
|
8454
8401
|
async disconnect() {
|
|
8455
8402
|
const Me = this._getClient();
|
|
@@ -8529,6 +8476,59 @@ const state$h = proxy$1({
|
|
|
8529
8476
|
eip2612: !1
|
|
8530
8477
|
}))) || [];
|
|
8531
8478
|
}
|
|
8479
|
+
}, state$d = proxy$1({
|
|
8480
|
+
view: "Connect",
|
|
8481
|
+
history: ["Connect"],
|
|
8482
|
+
transactionStack: []
|
|
8483
|
+
}), RouterController = {
|
|
8484
|
+
state: state$d,
|
|
8485
|
+
subscribeKey(Me, H) {
|
|
8486
|
+
return subscribeKey$1(state$d, Me, H);
|
|
8487
|
+
},
|
|
8488
|
+
pushTransactionStack(Me) {
|
|
8489
|
+
state$d.transactionStack.push(Me);
|
|
8490
|
+
},
|
|
8491
|
+
popTransactionStack(Me) {
|
|
8492
|
+
var J, Ne;
|
|
8493
|
+
const H = state$d.transactionStack.pop();
|
|
8494
|
+
if (H)
|
|
8495
|
+
if (Me)
|
|
8496
|
+
this.goBack(), (J = H == null ? void 0 : H.onCancel) == null || J.call(H);
|
|
8497
|
+
else {
|
|
8498
|
+
if (H.goBack)
|
|
8499
|
+
this.goBack();
|
|
8500
|
+
else if (H.replace) {
|
|
8501
|
+
const Ue = state$d.history.indexOf("ConnectingSiwe");
|
|
8502
|
+
Ue > 0 ? this.goBackToIndex(Ue - 1) : (ModalController.close(), state$d.history = []);
|
|
8503
|
+
} else
|
|
8504
|
+
H.view && this.reset(H.view);
|
|
8505
|
+
(Ne = H == null ? void 0 : H.onSuccess) == null || Ne.call(H);
|
|
8506
|
+
}
|
|
8507
|
+
},
|
|
8508
|
+
push(Me, H) {
|
|
8509
|
+
Me !== state$d.view && (state$d.view = Me, state$d.history.push(Me), state$d.data = H);
|
|
8510
|
+
},
|
|
8511
|
+
reset(Me) {
|
|
8512
|
+
state$d.view = Me, state$d.history = [Me];
|
|
8513
|
+
},
|
|
8514
|
+
replace(Me, H) {
|
|
8515
|
+
state$d.history.at(-1) === Me || (state$d.view = Me, state$d.history[state$d.history.length - 1] = Me, state$d.data = H);
|
|
8516
|
+
},
|
|
8517
|
+
goBack() {
|
|
8518
|
+
if (state$d.history.length > 1) {
|
|
8519
|
+
state$d.history.pop();
|
|
8520
|
+
const [Me] = state$d.history.slice(-1);
|
|
8521
|
+
Me && (state$d.view = Me);
|
|
8522
|
+
} else
|
|
8523
|
+
ModalController.close();
|
|
8524
|
+
},
|
|
8525
|
+
goBackToIndex(Me) {
|
|
8526
|
+
if (state$d.history.length > 1) {
|
|
8527
|
+
state$d.history = state$d.history.slice(0, Me + 1);
|
|
8528
|
+
const [H] = state$d.history.slice(-1);
|
|
8529
|
+
H && (state$d.view = H);
|
|
8530
|
+
}
|
|
8531
|
+
}
|
|
8532
8532
|
}, SwapCalculationUtil = {
|
|
8533
8533
|
getGasPriceInEther(Me, H) {
|
|
8534
8534
|
const J = H * Me;
|
|
@@ -8945,7 +8945,6 @@ const state$h = proxy$1({
|
|
|
8945
8945
|
}), state$c.maxSlippage = SwapCalculationUtil.getMaxSlippage(state$c.slippage, state$c.toTokenAmount), state$c.providerFee = SwapCalculationUtil.getProviderFee(state$c.sourceTokenAmount));
|
|
8946
8946
|
}
|
|
8947
8947
|
}, state$b = proxy$1({
|
|
8948
|
-
isConnected: !1,
|
|
8949
8948
|
currentTab: 0,
|
|
8950
8949
|
tokenBalance: [],
|
|
8951
8950
|
smartAccountDeployed: !1,
|
|
@@ -8971,15 +8970,9 @@ const state$h = proxy$1({
|
|
|
8971
8970
|
}
|
|
8972
8971
|
}, J);
|
|
8973
8972
|
},
|
|
8974
|
-
setIsConnected(Me, H) {
|
|
8975
|
-
ChainController.setAccountProp("isConnected", Me, H);
|
|
8976
|
-
},
|
|
8977
8973
|
setStatus(Me, H) {
|
|
8978
8974
|
ChainController.setAccountProp("status", Me, H);
|
|
8979
8975
|
},
|
|
8980
|
-
getChainIsConnected(Me) {
|
|
8981
|
-
return ChainController.getAccountProp("isConnected", Me);
|
|
8982
|
-
},
|
|
8983
8976
|
getCaipAddress(Me) {
|
|
8984
8977
|
return ChainController.getAccountProp("caipAddress", Me);
|
|
8985
8978
|
},
|
|
@@ -9072,7 +9065,6 @@ const state$h = proxy$1({
|
|
|
9072
9065
|
Object.assign(state$a, { ...state$a, ...Me });
|
|
9073
9066
|
}
|
|
9074
9067
|
}, accountState = {
|
|
9075
|
-
isConnected: !1,
|
|
9076
9068
|
currentTab: 0,
|
|
9077
9069
|
tokenBalance: [],
|
|
9078
9070
|
smartAccountDeployed: !1,
|
|
@@ -9167,31 +9159,24 @@ const state$h = proxy$1({
|
|
|
9167
9159
|
[Me]: H
|
|
9168
9160
|
}, Ne);
|
|
9169
9161
|
},
|
|
9170
|
-
setActiveNamespace(Me
|
|
9171
|
-
var
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
} else {
|
|
9179
|
-
state$9.activeChain = Me;
|
|
9180
|
-
const qe = Me ? (Ue = state$9.chains.get(Me)) == null ? void 0 : Ue.caipNetworks : [];
|
|
9181
|
-
state$9.activeCaipNetwork = qe == null ? void 0 : qe[0], PublicStateController.set({
|
|
9182
|
-
activeChain: Me,
|
|
9183
|
-
selectedNetworkId: (Fe = state$9.activeCaipNetwork) == null ? void 0 : Fe.id
|
|
9184
|
-
});
|
|
9185
|
-
}
|
|
9162
|
+
setActiveNamespace(Me) {
|
|
9163
|
+
var Ne, je;
|
|
9164
|
+
state$9.activeChain = Me;
|
|
9165
|
+
const H = Me ? state$9.chains.get(Me) : void 0, J = (Ne = H == null ? void 0 : H.networkState) == null ? void 0 : Ne.caipNetwork;
|
|
9166
|
+
J != null && J.id && (state$9.activeCaipAddress = (je = H == null ? void 0 : H.accountState) == null ? void 0 : je.caipAddress, state$9.activeCaipNetwork = J, SafeLocalStorage.setItem(SafeLocalStorageKeys.ACTIVE_CAIP_NETWORK_ID, J == null ? void 0 : J.id), PublicStateController.set({
|
|
9167
|
+
activeChain: Me,
|
|
9168
|
+
selectedNetworkId: J == null ? void 0 : J.id
|
|
9169
|
+
}));
|
|
9186
9170
|
},
|
|
9187
9171
|
setActiveCaipNetwork(Me) {
|
|
9188
|
-
var J;
|
|
9172
|
+
var J, Ne;
|
|
9189
9173
|
if (!Me)
|
|
9190
9174
|
return;
|
|
9191
|
-
|
|
9175
|
+
const H = state$9.chains.get(Me.chainNamespace);
|
|
9176
|
+
state$9.activeChain = Me.chainNamespace, state$9.activeCaipNetwork = Me, state$9.activeCaipAddress = (J = H == null ? void 0 : H.accountState) == null ? void 0 : J.caipAddress, H && (NetworkController.replaceState(H.networkState), AccountController.replaceState(H.accountState)), PublicStateController.set({
|
|
9192
9177
|
activeChain: state$9.activeChain,
|
|
9193
|
-
selectedNetworkId: (
|
|
9194
|
-
}), SafeLocalStorage.setItem(SafeLocalStorageKeys.ACTIVE_CAIP_NETWORK_ID, Me.id)
|
|
9178
|
+
selectedNetworkId: (Ne = state$9.activeCaipNetwork) == null ? void 0 : Ne.id
|
|
9179
|
+
}), SafeLocalStorage.setItem(SafeLocalStorageKeys.ACTIVE_CAIP_NETWORK_ID, Me.id);
|
|
9195
9180
|
},
|
|
9196
9181
|
/**
|
|
9197
9182
|
* The setCaipNetwork function is being called for different purposes and it needs to be controlled if it should replace the NetworkController state or not.
|
|
@@ -9211,21 +9196,21 @@ const state$h = proxy$1({
|
|
|
9211
9196
|
setActiveConnector(Me) {
|
|
9212
9197
|
Me && (state$9.activeConnector = ref$2(Me));
|
|
9213
9198
|
},
|
|
9214
|
-
getNetworkControllerClient() {
|
|
9215
|
-
const
|
|
9216
|
-
if (
|
|
9217
|
-
if (!
|
|
9199
|
+
getNetworkControllerClient(Me) {
|
|
9200
|
+
const H = SafeLocalStorage.getItem(SafeLocalStorageKeys.WALLET_ID), J = Me || state$9.activeChain, Ne = H === "walletConnect", je = state$9.universalAdapter.networkControllerClient;
|
|
9201
|
+
if (Ne || state$9.noAdapters) {
|
|
9202
|
+
if (!je)
|
|
9218
9203
|
throw new Error("Universal Adapter's networkControllerClient is not set");
|
|
9219
|
-
return
|
|
9204
|
+
return je;
|
|
9220
9205
|
}
|
|
9221
|
-
if (!
|
|
9206
|
+
if (!J)
|
|
9222
9207
|
throw new Error("Chain is required to get network controller client");
|
|
9223
|
-
const
|
|
9224
|
-
if (!
|
|
9208
|
+
const Fe = state$9.chains.get(J);
|
|
9209
|
+
if (!Fe)
|
|
9225
9210
|
throw new Error("Chain adapter not found");
|
|
9226
|
-
if (!
|
|
9211
|
+
if (!Fe.networkControllerClient)
|
|
9227
9212
|
throw new Error("NetworkController client not set");
|
|
9228
|
-
return
|
|
9213
|
+
return Fe.networkControllerClient;
|
|
9229
9214
|
},
|
|
9230
9215
|
getConnectionControllerClient(Me) {
|
|
9231
9216
|
var qe;
|
|
@@ -9281,7 +9266,6 @@ const state$h = proxy$1({
|
|
|
9281
9266
|
if (!H)
|
|
9282
9267
|
throw new Error("Chain is required to set account prop");
|
|
9283
9268
|
ChainController.state.activeCaipAddress = void 0, this.setChainAccountData(H, ref$2({
|
|
9284
|
-
isConnected: !1,
|
|
9285
9269
|
smartAccountDeployed: !1,
|
|
9286
9270
|
currentTab: 0,
|
|
9287
9271
|
caipAddress: void 0,
|
|
@@ -9301,9 +9285,9 @@ const state$h = proxy$1({
|
|
|
9301
9285
|
}));
|
|
9302
9286
|
}
|
|
9303
9287
|
}, StorageUtil = {
|
|
9304
|
-
setWalletConnectDeepLink({
|
|
9288
|
+
setWalletConnectDeepLink({ name: Me, href: H }) {
|
|
9305
9289
|
try {
|
|
9306
|
-
SafeLocalStorage.setItem(SafeLocalStorageKeys.DEEPLINK_CHOICE, Me);
|
|
9290
|
+
SafeLocalStorage.setItem(SafeLocalStorageKeys.DEEPLINK_CHOICE, JSON.stringify({ href: H, name: Me }));
|
|
9307
9291
|
} catch {
|
|
9308
9292
|
console.info("Unable to set WalletConnect deep link");
|
|
9309
9293
|
}
|
|
@@ -9312,7 +9296,7 @@ const state$h = proxy$1({
|
|
|
9312
9296
|
try {
|
|
9313
9297
|
const Me = SafeLocalStorage.getItem(SafeLocalStorageKeys.DEEPLINK_CHOICE);
|
|
9314
9298
|
if (Me)
|
|
9315
|
-
return Me;
|
|
9299
|
+
return JSON.parse(Me);
|
|
9316
9300
|
} catch {
|
|
9317
9301
|
console.info("Unable to get WalletConnect deep link");
|
|
9318
9302
|
}
|
|
@@ -53094,7 +53078,7 @@ class UniversalAdapterClient {
|
|
|
53094
53078
|
} else {
|
|
53095
53079
|
const Ko = await ((wi = J == null ? void 0 : J.getMessageParams) == null ? void 0 : wi.call(J)), qo = (Ai = J == null ? void 0 : J.options) == null ? void 0 : Ai.enabled, tc = typeof (Ue == null ? void 0 : Ue.authenticate) == "function", os = Ko && Object.keys(Ko || {}).length > 0;
|
|
53096
53080
|
if (J && qo && Ko && tc && os) {
|
|
53097
|
-
const { SIWEController: nc, getDidChainId: cc, getDidAddress: Yo } = await import("./index-
|
|
53081
|
+
const { SIWEController: nc, getDidChainId: cc, getDidAddress: Yo } = await import("./index-6X8YJouh.js"), Zo = (vi = this.caipNetworks) == null ? void 0 : vi.filter((rs) => rs.chainNamespace === "eip155").map((rs) => rs.id);
|
|
53098
53082
|
Ko.chains = (lo = this.caipNetworks) == null ? void 0 : lo.filter((rs) => rs.chainNamespace === "eip155").map((rs) => rs.chainId);
|
|
53099
53083
|
const ic = await Ue.authenticate({
|
|
53100
53084
|
nonce: await ((jo = J == null ? void 0 : J.getNonce) == null ? void 0 : jo.call(J)),
|
|
@@ -53132,7 +53116,7 @@ class UniversalAdapterClient {
|
|
|
53132
53116
|
disconnect: async () => {
|
|
53133
53117
|
var je, Ue, Fe, qe;
|
|
53134
53118
|
if (SafeLocalStorage.removeItem(SafeLocalStorageKeys.WALLET_ID), (je = J == null ? void 0 : J.options) != null && je.signOutOnDisconnect) {
|
|
53135
|
-
const { SIWEController: Ke } = await import("./index-
|
|
53119
|
+
const { SIWEController: Ke } = await import("./index-6X8YJouh.js");
|
|
53136
53120
|
await Ke.signOut();
|
|
53137
53121
|
}
|
|
53138
53122
|
await ((Ue = this.walletConnectProvider) == null ? void 0 : Ue.disconnect()), (Fe = this.appKit) == null || Fe.resetAccount("eip155"), (qe = this.appKit) == null || qe.resetAccount("solana");
|
|
@@ -53294,7 +53278,7 @@ class UniversalAdapterClient {
|
|
|
53294
53278
|
((Fe = this.appKit) == null ? void 0 : Fe.getIsConnectedState()) || !1 ? H.forEach(async (Ge) => {
|
|
53295
53279
|
var vi, lo, jo, Go, Ko;
|
|
53296
53280
|
const He = Ge, wi = (vi = J == null ? void 0 : J[Ge]) == null ? void 0 : vi.accounts[0];
|
|
53297
|
-
((lo = this.appKit) == null ? void 0 : lo.getCaipAddress(He)) || ((jo = this.appKit) == null || jo.setPreferredAccountType(Ne, He), (Go = this.appKit) == null || Go.setCaipAddress(wi, He), this.syncConnectedWalletInfo(),
|
|
53281
|
+
((lo = this.appKit) == null ? void 0 : lo.getCaipAddress(He)) || ((jo = this.appKit) == null || jo.setPreferredAccountType(Ne, He), (Go = this.appKit) == null || Go.setCaipAddress(wi, He), this.syncConnectedWalletInfo(), await Promise.all([(Ko = this.appKit) == null ? void 0 : Ko.setApprovedCaipNetworksData(He)])), this.syncAccounts();
|
|
53298
53282
|
}) : ((qe = this.appKit) == null || qe.resetWcConnection(), (Ke = this.appKit) == null || Ke.resetNetwork(), this.syncAccounts(!0));
|
|
53299
53283
|
}
|
|
53300
53284
|
syncAccounts(H = !1) {
|
|
@@ -53337,11 +53321,9 @@ let isInitialized = !1;
|
|
|
53337
53321
|
class AppKit {
|
|
53338
53322
|
constructor(H) {
|
|
53339
53323
|
var J;
|
|
53340
|
-
this.initPromise = void 0, this.
|
|
53341
|
-
AccountController.setIsConnected(Ne, je);
|
|
53342
|
-
}, this.setStatus = (Ne, je) => {
|
|
53324
|
+
this.initPromise = void 0, this.setStatus = (Ne, je) => {
|
|
53343
53325
|
AccountController.setStatus(Ne, je);
|
|
53344
|
-
}, this.getIsConnectedState = () =>
|
|
53326
|
+
}, this.getIsConnectedState = () => !!ChainController.state.activeCaipAddress, this.setAllAccounts = (Ne, je) => {
|
|
53345
53327
|
AccountController.setAllAccounts(Ne, je), OptionsController.setHasMultipleAddresses((Ne == null ? void 0 : Ne.length) > 1);
|
|
53346
53328
|
}, this.addAddressLabel = (Ne, je, Ue) => {
|
|
53347
53329
|
AccountController.addAddressLabel(Ne, je, Ue);
|
|
@@ -53426,9 +53408,6 @@ class AppKit {
|
|
|
53426
53408
|
switchNetwork(H) {
|
|
53427
53409
|
return NetworkController.switchActiveNetwork(H);
|
|
53428
53410
|
}
|
|
53429
|
-
getIsConnected() {
|
|
53430
|
-
return AccountController.state.isConnected;
|
|
53431
|
-
}
|
|
53432
53411
|
getWalletProvider() {
|
|
53433
53412
|
return ChainController.state.activeChain ? ProviderUtil.state.providers[ChainController.state.activeChain] : null;
|
|
53434
53413
|
}
|
|
@@ -53506,7 +53485,7 @@ class AppKit {
|
|
|
53506
53485
|
async initControllers(H) {
|
|
53507
53486
|
var Ne;
|
|
53508
53487
|
if (OptionsController.setProjectId(H.projectId), OptionsController.setSdkVersion(H.sdkVersion), this.adapters = H.adapters, this.setMetadata(H), this.extendCaipNetworks(H), this.initializeUniversalAdapter(H), this.initializeAdapters(H), this.setDefaultNetwork(H), OptionsController.setAllWallets(H.allWallets), OptionsController.setIncludeWalletIds(H.includeWalletIds), OptionsController.setExcludeWalletIds(H.excludeWalletIds), H.excludeWalletIds && ApiController.searchWalletByIds({ ids: H.excludeWalletIds }), OptionsController.setFeaturedWalletIds(H.featuredWalletIds), OptionsController.setTokens(H.tokens), OptionsController.setTermsConditionsUrl(H.termsConditionsUrl), OptionsController.setPrivacyPolicyUrl(H.privacyPolicyUrl), OptionsController.setCustomWallets(H.customWallets), OptionsController.setFeatures(H.features), OptionsController.setEnableWalletConnect(H.enableWalletConnect !== !1), OptionsController.setEnableWallets(H.enableWallets !== !1), H.metadata && OptionsController.setMetadata(H.metadata), H.themeMode && ThemeController.setThemeMode(H.themeMode), H.themeVariables && ThemeController.setThemeVariables(H.themeVariables), H.disableAppend && OptionsController.setDisableAppend(!!H.disableAppend), ((Ne = H.adapters) == null ? void 0 : Ne.find((je) => je.chainNamespace === ConstantsUtil$3.CHAIN.EVM)) && H.siweConfig) {
|
|
53509
|
-
const { SIWEController: je } = await import("./index-
|
|
53488
|
+
const { SIWEController: je } = await import("./index-6X8YJouh.js");
|
|
53510
53489
|
je.setSIWEClient(H.siweConfig);
|
|
53511
53490
|
}
|
|
53512
53491
|
}
|
|
@@ -53551,8 +53530,8 @@ class AppKit {
|
|
|
53551
53530
|
async initOrContinue() {
|
|
53552
53531
|
return !this.initPromise && !isInitialized && CoreHelperUtil.isClient() && (isInitialized = !0, this.initPromise = new Promise(async (H) => {
|
|
53553
53532
|
await Promise.all([
|
|
53554
|
-
import("./index-
|
|
53555
|
-
import("./w3m-modal-
|
|
53533
|
+
import("./index-RP8m5fY-.js"),
|
|
53534
|
+
import("./w3m-modal-B3w1zQhA.js")
|
|
53556
53535
|
]);
|
|
53557
53536
|
const J = document.createElement("w3m-modal");
|
|
53558
53537
|
OptionsController.state.disableAppend || document.body.insertAdjacentElement("beforeend", J), H();
|
|
@@ -59443,7 +59422,7 @@ let W3mSelectAddressesView = class extends h$3 {
|
|
|
59443
59422
|
this.selectedAccounts.length > 0 ? (this.isApproving = !0, AccountController.setAllAccounts(this.selectedAccounts, ChainController.state.activeChain), AccountController.setShouldUpdateToAddress(((H = this.selectedAccounts[0]) == null ? void 0 : H.address) ?? "", ChainController.state.activeChain), this.approved = !0, this.isApproving = !1, ModalController.close()) : this.onCancel();
|
|
59444
59423
|
}
|
|
59445
59424
|
async onCancel() {
|
|
59446
|
-
const {
|
|
59425
|
+
const { activeCaipAddress: H } = ChainController.state;
|
|
59447
59426
|
H ? (await ConnectionController.disconnect(), ModalController.close()) : RouterController.push("Connect");
|
|
59448
59427
|
}
|
|
59449
59428
|
disconnectedCallback() {
|
|
@@ -61247,7 +61226,7 @@ let W3mHeader = class extends h$3 {
|
|
|
61247
61226
|
}
|
|
61248
61227
|
async onClose() {
|
|
61249
61228
|
if (this.isSiweEnabled) {
|
|
61250
|
-
const { SIWEController: H } = await import("./index-
|
|
61229
|
+
const { SIWEController: H } = await import("./index-6X8YJouh.js"), J = RouterController.state.view === "ApproveTransaction";
|
|
61251
61230
|
H.state.status !== "success" && J ? RouterController.popTransactionStack(!0) : ModalController.close();
|
|
61252
61231
|
} else
|
|
61253
61232
|
ModalController.close();
|
|
@@ -64211,7 +64190,7 @@ const WalletUtil = {
|
|
|
64211
64190
|
return Me.filter((qe) => !Ue.includes(String(qe == null ? void 0 : qe.rdns)));
|
|
64212
64191
|
},
|
|
64213
64192
|
filterOutDuplicatesByIds(Me) {
|
|
64214
|
-
const H = ConnectorController.state.connectors, J = StorageUtil.getRecentWallets(), Ne = H.map((qe) => qe.explorerId), je = J.map((qe) => qe.id), Ue = Ne.concat(je);
|
|
64193
|
+
const H = ConnectorController.state.connectors.filter((qe) => qe.type === "ANNOUNCED" || qe.type === "INJECTED"), J = StorageUtil.getRecentWallets(), Ne = H.map((qe) => qe.explorerId), je = J.map((qe) => qe.id), Ue = Ne.concat(je);
|
|
64215
64194
|
return Me.filter((qe) => !Ue.includes(qe == null ? void 0 : qe.id));
|
|
64216
64195
|
},
|
|
64217
64196
|
filterOutDuplicateWallets(Me) {
|