@megaeth-labs/wallet-sdk 0.1.15-beta.5 → 0.1.15-beta.6
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/index.cjs +12 -11
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +12 -11
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -52,22 +52,23 @@ var events = {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
// src/consts.ts
|
|
55
|
-
var WALLET_URL = "https://account
|
|
55
|
+
var WALLET_URL = "https://account.megaeth.com";
|
|
56
56
|
var LOCAL_WALLET_URL = "http://localhost:4000";
|
|
57
57
|
|
|
58
58
|
// src/helpers.ts
|
|
59
|
+
var param = (key, value) => value !== void 0 && value !== "" ? `${key}=${encodeURIComponent(String(value))}` : void 0;
|
|
59
60
|
var getWalletUrl = (config) => {
|
|
60
|
-
const origin = config.devMode ? LOCAL_WALLET_URL : WALLET_URL;
|
|
61
|
+
const origin = config.walletOriginUrl ?? (config.devMode ? LOCAL_WALLET_URL : WALLET_URL);
|
|
61
62
|
const params = [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
];
|
|
63
|
+
param("network", config.network),
|
|
64
|
+
param("sponsorUrl", config.sponsorUrl),
|
|
65
|
+
param("sponsorMode", config.sponsorMode),
|
|
66
|
+
param("sponsorToken", config.sponsorToken),
|
|
67
|
+
param("debug", config.debug),
|
|
68
|
+
param("logging", config.logging),
|
|
69
|
+
param("apiUrl", config.apiUrl),
|
|
70
|
+
param("relayerUrl", config.relayerUrl)
|
|
71
|
+
].filter((value) => Boolean(value));
|
|
71
72
|
return {
|
|
72
73
|
origin,
|
|
73
74
|
uiUrl: `${origin}?${params.join("&")}`
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -16,22 +16,23 @@ var events = {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
// src/consts.ts
|
|
19
|
-
var WALLET_URL = "https://account
|
|
19
|
+
var WALLET_URL = "https://account.megaeth.com";
|
|
20
20
|
var LOCAL_WALLET_URL = "http://localhost:4000";
|
|
21
21
|
|
|
22
22
|
// src/helpers.ts
|
|
23
|
+
var param = (key, value) => value !== void 0 && value !== "" ? `${key}=${encodeURIComponent(String(value))}` : void 0;
|
|
23
24
|
var getWalletUrl = (config) => {
|
|
24
|
-
const origin = config.devMode ? LOCAL_WALLET_URL : WALLET_URL;
|
|
25
|
+
const origin = config.walletOriginUrl ?? (config.devMode ? LOCAL_WALLET_URL : WALLET_URL);
|
|
25
26
|
const params = [
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
];
|
|
27
|
+
param("network", config.network),
|
|
28
|
+
param("sponsorUrl", config.sponsorUrl),
|
|
29
|
+
param("sponsorMode", config.sponsorMode),
|
|
30
|
+
param("sponsorToken", config.sponsorToken),
|
|
31
|
+
param("debug", config.debug),
|
|
32
|
+
param("logging", config.logging),
|
|
33
|
+
param("apiUrl", config.apiUrl),
|
|
34
|
+
param("relayerUrl", config.relayerUrl)
|
|
35
|
+
].filter((value) => Boolean(value));
|
|
35
36
|
return {
|
|
36
37
|
origin,
|
|
37
38
|
uiUrl: `${origin}?${params.join("&")}`
|