@dappworks/kit 0.4.198 → 0.4.200
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/{chunk-H3MULQID.mjs → chunk-274FDVNP.mjs} +2 -2
- package/dist/{chunk-2AQLVFWH.mjs → chunk-BE2I23U2.mjs} +20 -21
- package/dist/chunk-BE2I23U2.mjs.map +1 -0
- package/dist/{chunk-MLOLEEPY.mjs → chunk-BUAUKNNF.mjs} +3 -3
- package/dist/dev.mjs +1 -1
- package/dist/form.mjs +1 -1
- package/dist/jsontable.mjs +3 -3
- package/dist/metrics.mjs +3 -3
- package/dist/plugins.mjs +1 -1
- package/dist/ui.mjs +2 -2
- package/dist/wallet.d.mts +6 -2
- package/dist/wallet.mjs +85 -61
- package/dist/wallet.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-2AQLVFWH.mjs.map +0 -1
- /package/dist/{chunk-H3MULQID.mjs.map → chunk-274FDVNP.mjs.map} +0 -0
- /package/dist/{chunk-MLOLEEPY.mjs.map → chunk-BUAUKNNF.mjs.map} +0 -0
package/dist/wallet.mjs
CHANGED
|
@@ -18,13 +18,14 @@ import EventEmitter from 'events';
|
|
|
18
18
|
import { encodeFunctionData, hashMessage, hashTypedData } from 'viem';
|
|
19
19
|
import { observer } from 'mobx-react-lite';
|
|
20
20
|
import { iopayWallet, metaMaskWallet, walletConnectWallet, okxWallet, binanceWallet } from '@rainbow-me/rainbowkit/wallets';
|
|
21
|
+
import { injected } from 'wagmi/connectors';
|
|
21
22
|
import { reaction } from 'mobx';
|
|
22
23
|
import { iotex as iotex$1, iotexTestnet as iotexTestnet$1 } from 'viem/chains';
|
|
23
24
|
import { Checkbox, Tooltip, Button, Popover, PopoverTrigger, PopoverContent, Input, Table, TableHeader, TableColumn, TableBody, TableRow, TableCell } from '@nextui-org/react';
|
|
24
25
|
|
|
25
|
-
// node_modules/@safe-global/safe-gateway-typescript-sdk/dist/utils.js
|
|
26
|
+
// ../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/utils.js
|
|
26
27
|
var require_utils = __commonJS({
|
|
27
|
-
"node_modules/@safe-global/safe-gateway-typescript-sdk/dist/utils.js"(exports) {
|
|
28
|
+
"../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/utils.js"(exports) {
|
|
28
29
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
29
30
|
function adopt(value) {
|
|
30
31
|
return value instanceof P ? value : new P(function(resolve) {
|
|
@@ -133,9 +134,9 @@ var require_utils = __commonJS({
|
|
|
133
134
|
}
|
|
134
135
|
});
|
|
135
136
|
|
|
136
|
-
// node_modules/@safe-global/safe-gateway-typescript-sdk/dist/endpoint.js
|
|
137
|
+
// ../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/endpoint.js
|
|
137
138
|
var require_endpoint = __commonJS({
|
|
138
|
-
"node_modules/@safe-global/safe-gateway-typescript-sdk/dist/endpoint.js"(exports) {
|
|
139
|
+
"../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/endpoint.js"(exports) {
|
|
139
140
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
140
141
|
exports.getEndpoint = exports.deleteEndpoint = exports.putEndpoint = exports.postEndpoint = void 0;
|
|
141
142
|
var utils_1 = require_utils();
|
|
@@ -170,18 +171,18 @@ var require_endpoint = __commonJS({
|
|
|
170
171
|
}
|
|
171
172
|
});
|
|
172
173
|
|
|
173
|
-
// node_modules/@safe-global/safe-gateway-typescript-sdk/dist/config.js
|
|
174
|
+
// ../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/config.js
|
|
174
175
|
var require_config = __commonJS({
|
|
175
|
-
"node_modules/@safe-global/safe-gateway-typescript-sdk/dist/config.js"(exports) {
|
|
176
|
+
"../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/config.js"(exports) {
|
|
176
177
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
177
178
|
exports.DEFAULT_BASE_URL = void 0;
|
|
178
179
|
exports.DEFAULT_BASE_URL = "https://safe-client.safe.global";
|
|
179
180
|
}
|
|
180
181
|
});
|
|
181
182
|
|
|
182
|
-
// node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/safe-info.js
|
|
183
|
+
// ../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/safe-info.js
|
|
183
184
|
var require_safe_info = __commonJS({
|
|
184
|
-
"node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/safe-info.js"(exports) {
|
|
185
|
+
"../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/safe-info.js"(exports) {
|
|
185
186
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
186
187
|
exports.ImplementationVersionState = void 0;
|
|
187
188
|
(function(ImplementationVersionState2) {
|
|
@@ -192,9 +193,9 @@ var require_safe_info = __commonJS({
|
|
|
192
193
|
}
|
|
193
194
|
});
|
|
194
195
|
|
|
195
|
-
// node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/safe-apps.js
|
|
196
|
+
// ../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/safe-apps.js
|
|
196
197
|
var require_safe_apps = __commonJS({
|
|
197
|
-
"node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/safe-apps.js"(exports) {
|
|
198
|
+
"../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/safe-apps.js"(exports) {
|
|
198
199
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
199
200
|
exports.SafeAppSocialPlatforms = exports.SafeAppFeatures = exports.SafeAppAccessPolicyTypes = void 0;
|
|
200
201
|
(function(SafeAppAccessPolicyTypes2) {
|
|
@@ -212,9 +213,9 @@ var require_safe_apps = __commonJS({
|
|
|
212
213
|
}
|
|
213
214
|
});
|
|
214
215
|
|
|
215
|
-
// node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/transactions.js
|
|
216
|
+
// ../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/transactions.js
|
|
216
217
|
var require_transactions = __commonJS({
|
|
217
|
-
"node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/transactions.js"(exports) {
|
|
218
|
+
"../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/transactions.js"(exports) {
|
|
218
219
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
219
220
|
exports.LabelValue = exports.StartTimeValue = exports.DurationType = exports.DetailedExecutionInfoType = exports.TransactionListItemType = exports.ConflictType = exports.TransactionInfoType = exports.SettingsInfoType = exports.TransactionTokenType = exports.TransferDirection = exports.TransactionStatus = exports.Operation = void 0;
|
|
220
221
|
(function(Operation3) {
|
|
@@ -289,9 +290,9 @@ var require_transactions = __commonJS({
|
|
|
289
290
|
}
|
|
290
291
|
});
|
|
291
292
|
|
|
292
|
-
// node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/chains.js
|
|
293
|
+
// ../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/chains.js
|
|
293
294
|
var require_chains = __commonJS({
|
|
294
|
-
"node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/chains.js"(exports) {
|
|
295
|
+
"../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/chains.js"(exports) {
|
|
295
296
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
296
297
|
exports.FEATURES = exports.GAS_PRICE_TYPE = exports.RPC_AUTHENTICATION = void 0;
|
|
297
298
|
(function(RPC_AUTHENTICATION2) {
|
|
@@ -319,9 +320,9 @@ var require_chains = __commonJS({
|
|
|
319
320
|
}
|
|
320
321
|
});
|
|
321
322
|
|
|
322
|
-
// node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/common.js
|
|
323
|
+
// ../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/common.js
|
|
323
324
|
var require_common = __commonJS({
|
|
324
|
-
"node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/common.js"(exports) {
|
|
325
|
+
"../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/common.js"(exports) {
|
|
325
326
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
326
327
|
exports.TokenType = void 0;
|
|
327
328
|
(function(TokenType3) {
|
|
@@ -332,16 +333,16 @@ var require_common = __commonJS({
|
|
|
332
333
|
}
|
|
333
334
|
});
|
|
334
335
|
|
|
335
|
-
// node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/master-copies.js
|
|
336
|
+
// ../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/master-copies.js
|
|
336
337
|
var require_master_copies = __commonJS({
|
|
337
|
-
"node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/master-copies.js"(exports) {
|
|
338
|
+
"../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/master-copies.js"(exports) {
|
|
338
339
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
339
340
|
}
|
|
340
341
|
});
|
|
341
342
|
|
|
342
|
-
// node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/decoded-data.js
|
|
343
|
+
// ../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/decoded-data.js
|
|
343
344
|
var require_decoded_data = __commonJS({
|
|
344
|
-
"node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/decoded-data.js"(exports) {
|
|
345
|
+
"../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/decoded-data.js"(exports) {
|
|
345
346
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
346
347
|
exports.ConfirmationViewTypes = void 0;
|
|
347
348
|
(function(ConfirmationViewTypes2) {
|
|
@@ -351,9 +352,9 @@ var require_decoded_data = __commonJS({
|
|
|
351
352
|
}
|
|
352
353
|
});
|
|
353
354
|
|
|
354
|
-
// node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/safe-messages.js
|
|
355
|
+
// ../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/safe-messages.js
|
|
355
356
|
var require_safe_messages = __commonJS({
|
|
356
|
-
"node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/safe-messages.js"(exports) {
|
|
357
|
+
"../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/safe-messages.js"(exports) {
|
|
357
358
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
358
359
|
exports.SafeMessageStatus = exports.SafeMessageListItemType = void 0;
|
|
359
360
|
(function(SafeMessageListItemType2) {
|
|
@@ -367,9 +368,9 @@ var require_safe_messages = __commonJS({
|
|
|
367
368
|
}
|
|
368
369
|
});
|
|
369
370
|
|
|
370
|
-
// node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/notifications.js
|
|
371
|
+
// ../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/notifications.js
|
|
371
372
|
var require_notifications = __commonJS({
|
|
372
|
-
"node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/notifications.js"(exports) {
|
|
373
|
+
"../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/notifications.js"(exports) {
|
|
373
374
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
374
375
|
exports.DeviceType = void 0;
|
|
375
376
|
(function(DeviceType2) {
|
|
@@ -380,16 +381,16 @@ var require_notifications = __commonJS({
|
|
|
380
381
|
}
|
|
381
382
|
});
|
|
382
383
|
|
|
383
|
-
// node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/relay.js
|
|
384
|
+
// ../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/relay.js
|
|
384
385
|
var require_relay = __commonJS({
|
|
385
|
-
"node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/relay.js"(exports) {
|
|
386
|
+
"../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/types/relay.js"(exports) {
|
|
386
387
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
387
388
|
}
|
|
388
389
|
});
|
|
389
390
|
|
|
390
|
-
// node_modules/@safe-global/safe-gateway-typescript-sdk/dist/index.js
|
|
391
|
+
// ../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/index.js
|
|
391
392
|
var require_dist = __commonJS({
|
|
392
|
-
"node_modules/@safe-global/safe-gateway-typescript-sdk/dist/index.js"(exports) {
|
|
393
|
+
"../../node_modules/@safe-global/safe-gateway-typescript-sdk/dist/index.js"(exports) {
|
|
393
394
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
394
395
|
if (k2 === void 0)
|
|
395
396
|
k2 = k;
|
|
@@ -2692,10 +2693,10 @@ var WalletHistoryStore = class {
|
|
|
2692
2693
|
}
|
|
2693
2694
|
};
|
|
2694
2695
|
|
|
2695
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/version.js
|
|
2696
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/version.js
|
|
2696
2697
|
var getSDKVersion = () => "9.1.0";
|
|
2697
2698
|
|
|
2698
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/communication/utils.js
|
|
2699
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/communication/utils.js
|
|
2699
2700
|
var dec2hex = (dec) => dec.toString(16).padStart(2, "0");
|
|
2700
2701
|
var generateId = (len) => {
|
|
2701
2702
|
const arr = new Uint8Array((len) / 2);
|
|
@@ -2709,7 +2710,7 @@ var generateRequestId = () => {
|
|
|
2709
2710
|
return (/* @__PURE__ */ new Date()).getTime().toString(36);
|
|
2710
2711
|
};
|
|
2711
2712
|
|
|
2712
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/communication/messageFormatter.js
|
|
2713
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/communication/messageFormatter.js
|
|
2713
2714
|
var MessageFormatter = class {
|
|
2714
2715
|
};
|
|
2715
2716
|
MessageFormatter.makeRequest = (method, params) => {
|
|
@@ -2736,7 +2737,7 @@ MessageFormatter.makeErrorResponse = (id, error, version) => ({
|
|
|
2736
2737
|
version
|
|
2737
2738
|
});
|
|
2738
2739
|
|
|
2739
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/communication/methods.js
|
|
2740
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/communication/methods.js
|
|
2740
2741
|
var Methods;
|
|
2741
2742
|
(function(Methods2) {
|
|
2742
2743
|
Methods2["sendTransactions"] = "sendTransactions";
|
|
@@ -2758,7 +2759,7 @@ var RestrictedMethods;
|
|
|
2758
2759
|
RestrictedMethods2["requestAddressBook"] = "requestAddressBook";
|
|
2759
2760
|
})(RestrictedMethods || (RestrictedMethods = {}));
|
|
2760
2761
|
|
|
2761
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/communication/index.js
|
|
2762
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/communication/index.js
|
|
2762
2763
|
var PostMessageCommunicator = class {
|
|
2763
2764
|
constructor(allowedOrigins = null, debugMode = false) {
|
|
2764
2765
|
this.allowedOrigins = null;
|
|
@@ -2818,15 +2819,15 @@ var PostMessageCommunicator = class {
|
|
|
2818
2819
|
};
|
|
2819
2820
|
var communication_default = PostMessageCommunicator;
|
|
2820
2821
|
|
|
2821
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/types/sdk.js
|
|
2822
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/types/sdk.js
|
|
2822
2823
|
var isObjectEIP712TypedData = (obj) => {
|
|
2823
2824
|
return typeof obj === "object" && obj != null && "domain" in obj && "types" in obj && "message" in obj;
|
|
2824
2825
|
};
|
|
2825
2826
|
|
|
2826
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/types/gateway.js
|
|
2827
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/types/gateway.js
|
|
2827
2828
|
var import_safe_gateway_typescript_sdk = __toESM(require_dist(), 1);
|
|
2828
2829
|
|
|
2829
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/txs/index.js
|
|
2830
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/txs/index.js
|
|
2830
2831
|
var TXs = class {
|
|
2831
2832
|
constructor(communicator) {
|
|
2832
2833
|
this.communicator = communicator;
|
|
@@ -2865,7 +2866,7 @@ var TXs = class {
|
|
|
2865
2866
|
}
|
|
2866
2867
|
};
|
|
2867
2868
|
|
|
2868
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/eth/constants.js
|
|
2869
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/eth/constants.js
|
|
2869
2870
|
var RPC_CALLS = {
|
|
2870
2871
|
eth_call: "eth_call",
|
|
2871
2872
|
eth_gasPrice: "eth_gasPrice",
|
|
@@ -2882,7 +2883,7 @@ var RPC_CALLS = {
|
|
|
2882
2883
|
safe_setSettings: "safe_setSettings"
|
|
2883
2884
|
};
|
|
2884
2885
|
|
|
2885
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/eth/index.js
|
|
2886
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/eth/index.js
|
|
2886
2887
|
var inputFormatters = {
|
|
2887
2888
|
defaultBlockParam: (arg = "latest") => arg,
|
|
2888
2889
|
returnFullTxObjectParam: (arg = false) => arg,
|
|
@@ -2958,11 +2959,11 @@ var Eth = class {
|
|
|
2958
2959
|
}
|
|
2959
2960
|
};
|
|
2960
2961
|
|
|
2961
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/safe/signatures.js
|
|
2962
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/safe/signatures.js
|
|
2962
2963
|
var MAGIC_VALUE = "0x1626ba7e";
|
|
2963
2964
|
var MAGIC_VALUE_BYTES = "0x20c13b0b";
|
|
2964
2965
|
|
|
2965
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/types/permissions.js
|
|
2966
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/types/permissions.js
|
|
2966
2967
|
var PERMISSIONS_REQUEST_REJECTED = 4001;
|
|
2967
2968
|
var PermissionsError = class _PermissionsError extends Error {
|
|
2968
2969
|
constructor(message, code, data) {
|
|
@@ -2973,7 +2974,7 @@ var PermissionsError = class _PermissionsError extends Error {
|
|
|
2973
2974
|
}
|
|
2974
2975
|
};
|
|
2975
2976
|
|
|
2976
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/wallet/index.js
|
|
2977
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/wallet/index.js
|
|
2977
2978
|
var Wallet = class {
|
|
2978
2979
|
constructor(communicator) {
|
|
2979
2980
|
this.communicator = communicator;
|
|
@@ -3008,7 +3009,7 @@ var Wallet = class {
|
|
|
3008
3009
|
}
|
|
3009
3010
|
};
|
|
3010
3011
|
|
|
3011
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/decorators/requirePermissions.js
|
|
3012
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/decorators/requirePermissions.js
|
|
3012
3013
|
var hasPermission = (required, permissions) => permissions.some((permission) => permission.parentCapability === required);
|
|
3013
3014
|
var requirePermission = () => (_, propertyKey, descriptor) => {
|
|
3014
3015
|
const originalMethod = descriptor.value;
|
|
@@ -3027,7 +3028,7 @@ var requirePermission = () => (_, propertyKey, descriptor) => {
|
|
|
3027
3028
|
};
|
|
3028
3029
|
var requirePermissions_default = requirePermission;
|
|
3029
3030
|
|
|
3030
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/safe/index.js
|
|
3031
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/safe/index.js
|
|
3031
3032
|
var __decorate = function(decorators, target, key, desc) {
|
|
3032
3033
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3033
3034
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -3226,7 +3227,7 @@ __decorate([
|
|
|
3226
3227
|
requirePermissions_default()
|
|
3227
3228
|
], Safe.prototype, "requestAddressBook", null);
|
|
3228
3229
|
|
|
3229
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/sdk.js
|
|
3230
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/sdk.js
|
|
3230
3231
|
var SafeAppsSDK = class {
|
|
3231
3232
|
constructor(opts = {}) {
|
|
3232
3233
|
const { allowedDomains = null, debug = false } = opts;
|
|
@@ -3239,7 +3240,7 @@ var SafeAppsSDK = class {
|
|
|
3239
3240
|
};
|
|
3240
3241
|
var sdk_default = SafeAppsSDK;
|
|
3241
3242
|
|
|
3242
|
-
// node_modules/@safe-global/safe-apps-sdk/dist/esm/index.js
|
|
3243
|
+
// ../../node_modules/@safe-global/safe-apps-sdk/dist/esm/index.js
|
|
3243
3244
|
var esm_default = sdk_default;
|
|
3244
3245
|
var SuccessTxDialog = observer((props) => {
|
|
3245
3246
|
return /* @__PURE__ */ React5.createElement("div", { className: "flex-col gap-4 py-10" }, /* @__PURE__ */ React5.createElement("div", { className: "w-full flex items-center justify-center" }, /* @__PURE__ */ React5.createElement(Icon, { icon: "icon-park-solid:check-one", width: "48", height: "48", className: "text-green-500" })), /* @__PURE__ */ React5.createElement("div", { className: "text-2xl font-[900] text-center mt-4" }, props.msg), /* @__PURE__ */ React5.createElement(
|
|
@@ -3267,12 +3268,29 @@ var WalletConfigStore = class {
|
|
|
3267
3268
|
this.projectId = "b69e844f38265667350efd78e3e1a5fb";
|
|
3268
3269
|
this.defaultChainId = 4689;
|
|
3269
3270
|
this.updateTicker = 1;
|
|
3271
|
+
this.walletUpdateTick = 0;
|
|
3272
|
+
this.isConnect = false;
|
|
3273
|
+
// This mode to resolve and walletClient and nextui in some extreme cases cause page infinite redraw bugs
|
|
3274
|
+
this.compatibleMode = true;
|
|
3270
3275
|
Object.assign(this, args);
|
|
3271
3276
|
}
|
|
3272
3277
|
set(params) {
|
|
3273
3278
|
Object.assign(this, params);
|
|
3274
3279
|
this.updateTicker += 1;
|
|
3275
3280
|
}
|
|
3281
|
+
get reconnectOnMount() {
|
|
3282
|
+
if (!this.compatibleMode)
|
|
3283
|
+
return true;
|
|
3284
|
+
if (!this.isConnect && this.walletUpdateTick == 0) {
|
|
3285
|
+
return true;
|
|
3286
|
+
}
|
|
3287
|
+
if (!this.isConnect && this.walletUpdateTick != 0) {
|
|
3288
|
+
return false;
|
|
3289
|
+
}
|
|
3290
|
+
if (this.isConnect) {
|
|
3291
|
+
return true;
|
|
3292
|
+
}
|
|
3293
|
+
}
|
|
3276
3294
|
get rainbowKitConfig() {
|
|
3277
3295
|
var _a;
|
|
3278
3296
|
return ObjectPool.get(`rainbowKitConfig-${(_a = this.supportedChains) == null ? void 0 : _a.map((i) => i.id).join("-")}`, () => {
|
|
@@ -3297,8 +3315,6 @@ var WalletConfigStore = class {
|
|
|
3297
3315
|
});
|
|
3298
3316
|
}
|
|
3299
3317
|
};
|
|
3300
|
-
|
|
3301
|
-
// module/Wallet/index.tsx
|
|
3302
3318
|
var WalletStore = class _WalletStore {
|
|
3303
3319
|
constructor(args) {
|
|
3304
3320
|
this.sid = "wallet";
|
|
@@ -3347,17 +3363,6 @@ var WalletStore = class _WalletStore {
|
|
|
3347
3363
|
get supportedChains() {
|
|
3348
3364
|
return RootStore.Get(WalletConfigStore).supportedChains;
|
|
3349
3365
|
}
|
|
3350
|
-
get reconnectOnMount() {
|
|
3351
|
-
if (!this.isConnect && this.updateTicker == 0) {
|
|
3352
|
-
return true;
|
|
3353
|
-
}
|
|
3354
|
-
if (!this.isConnect && this.updateTicker != 0) {
|
|
3355
|
-
return false;
|
|
3356
|
-
}
|
|
3357
|
-
if (this.isConnect) {
|
|
3358
|
-
return true;
|
|
3359
|
-
}
|
|
3360
|
-
}
|
|
3361
3366
|
use() {
|
|
3362
3367
|
const { data: walletClient, isSuccess } = useWalletClient();
|
|
3363
3368
|
const { chain, address, isConnected } = useAccount();
|
|
@@ -3365,6 +3370,7 @@ var WalletStore = class _WalletStore {
|
|
|
3365
3370
|
const { openConnectModal } = useConnectModal();
|
|
3366
3371
|
const { connect } = useConnect();
|
|
3367
3372
|
const { disconnect } = useDisconnect();
|
|
3373
|
+
const walletConfigStore = RootStore.Get(WalletConfigStore);
|
|
3368
3374
|
this.set({
|
|
3369
3375
|
//@ts-ignore
|
|
3370
3376
|
connect,
|
|
@@ -3381,11 +3387,25 @@ var WalletStore = class _WalletStore {
|
|
|
3381
3387
|
account: address,
|
|
3382
3388
|
chain
|
|
3383
3389
|
});
|
|
3390
|
+
walletConfigStore.set({
|
|
3391
|
+
isConnect: isConnected
|
|
3392
|
+
});
|
|
3384
3393
|
if (this.account) {
|
|
3385
3394
|
this.updateTicker++;
|
|
3395
|
+
walletConfigStore.set({
|
|
3396
|
+
walletUpdateTick: this.updateTicker
|
|
3397
|
+
});
|
|
3386
3398
|
this.event.emit("walletAccount:ready");
|
|
3387
3399
|
}
|
|
3388
3400
|
}, [address, isConnected, chain]);
|
|
3401
|
+
useEffect(() => {
|
|
3402
|
+
if (!address) {
|
|
3403
|
+
if (walletConfigStore.compatibleMode) {
|
|
3404
|
+
console.log("%c[walletStore]: walletStore plugin is running in compatible mode", "color: yellow; font-weight: bold;");
|
|
3405
|
+
connect(walletConfigStore.rainbowKitConfig, { connector: injected() });
|
|
3406
|
+
}
|
|
3407
|
+
}
|
|
3408
|
+
}, []);
|
|
3389
3409
|
useEffect(() => {
|
|
3390
3410
|
setTimeout(() => {
|
|
3391
3411
|
this.balance.call();
|
|
@@ -3651,7 +3671,8 @@ var WalletProvider = ({
|
|
|
3651
3671
|
children,
|
|
3652
3672
|
theme,
|
|
3653
3673
|
appName,
|
|
3654
|
-
supportedChains
|
|
3674
|
+
supportedChains,
|
|
3675
|
+
compatibleMode = true
|
|
3655
3676
|
}) => {
|
|
3656
3677
|
const walletConfig = RootStore.Get(WalletConfigStore, { args: { supportedChains: supportedChains != null ? supportedChains : [iotex] } });
|
|
3657
3678
|
const [config, setConfig] = useState(walletConfig.rainbowKitConfig);
|
|
@@ -3665,10 +3686,13 @@ var WalletProvider = ({
|
|
|
3665
3686
|
if (appName) {
|
|
3666
3687
|
walletConfig.appName = appName;
|
|
3667
3688
|
}
|
|
3668
|
-
|
|
3689
|
+
if (compatibleMode != void 0) {
|
|
3690
|
+
walletConfig.compatibleMode = compatibleMode;
|
|
3691
|
+
}
|
|
3692
|
+
}, [appName, compatibleMode]);
|
|
3669
3693
|
return (
|
|
3670
3694
|
//@ts-ignore
|
|
3671
|
-
/* @__PURE__ */ React5.createElement(WagmiProvider, { config, reconnectOnMount:
|
|
3695
|
+
/* @__PURE__ */ React5.createElement(WagmiProvider, { config, reconnectOnMount: walletConfig.reconnectOnMount }, /* @__PURE__ */ React5.createElement(QueryClientProvider, { client: queryClient }, /* @__PURE__ */ React5.createElement(RainbowKitProvider, { locale: "en", theme: theme == "dark" ? darkTheme() : lightTheme() }, children, /* @__PURE__ */ React5.createElement(WalletConnect, null))))
|
|
3672
3696
|
);
|
|
3673
3697
|
};
|
|
3674
3698
|
var WalletConnect = () => {
|