@tomo-inc/chains-service 0.0.25 → 0.0.27
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 +6 -3
- package/dist/index.js +6 -3
- package/package.json +1 -1
- package/src/config.ts +6 -1
- package/src/solana/service.ts +2 -3
package/dist/index.cjs
CHANGED
|
@@ -3903,15 +3903,19 @@ function tomoPublicApiService(publicApiBase, tomoAppInfo) {
|
|
|
3903
3903
|
walletAPIs: WalletAPIs.getInstance(publicApiBase, tomoAppInfo)
|
|
3904
3904
|
};
|
|
3905
3905
|
}
|
|
3906
|
+
var TX_DOMAIN_OVERRIDES = {
|
|
3907
|
+
"prod-dogeos": "https://wallet.tomo.inc"
|
|
3908
|
+
};
|
|
3906
3909
|
function getConfig(tomoStage) {
|
|
3907
3910
|
const domain = walletUtils.TomoApiDomains[tomoStage];
|
|
3908
3911
|
if (!domain) {
|
|
3909
3912
|
throw new Error("Invalid tomo stage");
|
|
3910
3913
|
}
|
|
3914
|
+
const txDomain = TX_DOMAIN_OVERRIDES[tomoStage] ?? domain;
|
|
3911
3915
|
return {
|
|
3912
3916
|
rpcBaseUrl: `${domain}`,
|
|
3913
3917
|
walletBaseUrl: `${domain}/wallet`,
|
|
3914
|
-
txBaseUrl: `${
|
|
3918
|
+
txBaseUrl: `${txDomain}/quote`,
|
|
3915
3919
|
tokenBaseUrl: `${domain}/token`,
|
|
3916
3920
|
userBaseUrl: `${domain}/user/api`
|
|
3917
3921
|
};
|
|
@@ -5188,8 +5192,7 @@ var SolanaService = class _SolanaService extends BaseService {
|
|
|
5188
5192
|
return fetch(url, { ...options });
|
|
5189
5193
|
}
|
|
5190
5194
|
};
|
|
5191
|
-
const
|
|
5192
|
-
const rpcUrl = `${domain}/rpc/v1/solana`;
|
|
5195
|
+
const rpcUrl = "https://wallet.tomo.inc/rpc/v1/solana";
|
|
5193
5196
|
this.rpcUrl = rpcUrl;
|
|
5194
5197
|
this.connection = new web3_js.Connection(rpcUrl, config);
|
|
5195
5198
|
}
|
package/dist/index.js
CHANGED
|
@@ -3895,15 +3895,19 @@ function tomoPublicApiService(publicApiBase, tomoAppInfo) {
|
|
|
3895
3895
|
walletAPIs: WalletAPIs.getInstance(publicApiBase, tomoAppInfo)
|
|
3896
3896
|
};
|
|
3897
3897
|
}
|
|
3898
|
+
var TX_DOMAIN_OVERRIDES = {
|
|
3899
|
+
"prod-dogeos": "https://wallet.tomo.inc"
|
|
3900
|
+
};
|
|
3898
3901
|
function getConfig(tomoStage) {
|
|
3899
3902
|
const domain = TomoApiDomains[tomoStage];
|
|
3900
3903
|
if (!domain) {
|
|
3901
3904
|
throw new Error("Invalid tomo stage");
|
|
3902
3905
|
}
|
|
3906
|
+
const txDomain = TX_DOMAIN_OVERRIDES[tomoStage] ?? domain;
|
|
3903
3907
|
return {
|
|
3904
3908
|
rpcBaseUrl: `${domain}`,
|
|
3905
3909
|
walletBaseUrl: `${domain}/wallet`,
|
|
3906
|
-
txBaseUrl: `${
|
|
3910
|
+
txBaseUrl: `${txDomain}/quote`,
|
|
3907
3911
|
tokenBaseUrl: `${domain}/token`,
|
|
3908
3912
|
userBaseUrl: `${domain}/user/api`
|
|
3909
3913
|
};
|
|
@@ -5180,8 +5184,7 @@ var SolanaService = class _SolanaService extends BaseService {
|
|
|
5180
5184
|
return fetch(url, { ...options });
|
|
5181
5185
|
}
|
|
5182
5186
|
};
|
|
5183
|
-
const
|
|
5184
|
-
const rpcUrl = `${domain}/rpc/v1/solana`;
|
|
5187
|
+
const rpcUrl = "https://wallet.tomo.inc/rpc/v1/solana";
|
|
5185
5188
|
this.rpcUrl = rpcUrl;
|
|
5186
5189
|
this.connection = new Connection(rpcUrl, config);
|
|
5187
5190
|
}
|
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { TomoApiDomains, TomoStage } from "@tomo-inc/wallet-utils";
|
|
2
2
|
|
|
3
|
+
const TX_DOMAIN_OVERRIDES: Partial<Record<TomoStage, string>> = {
|
|
4
|
+
"prod-dogeos": "https://wallet.tomo.inc",
|
|
5
|
+
};
|
|
6
|
+
|
|
3
7
|
export function getConfig(tomoStage: TomoStage) {
|
|
4
8
|
const domain = TomoApiDomains[tomoStage];
|
|
5
9
|
if (!domain) {
|
|
6
10
|
throw new Error("Invalid tomo stage");
|
|
7
11
|
}
|
|
12
|
+
const txDomain = TX_DOMAIN_OVERRIDES[tomoStage] ?? domain;
|
|
8
13
|
return {
|
|
9
14
|
rpcBaseUrl: `${domain}`,
|
|
10
15
|
walletBaseUrl: `${domain}/wallet`,
|
|
11
|
-
txBaseUrl: `${
|
|
16
|
+
txBaseUrl: `${txDomain}/quote`,
|
|
12
17
|
tokenBaseUrl: `${domain}/token`,
|
|
13
18
|
userBaseUrl: `${domain}/user/api`,
|
|
14
19
|
};
|
package/src/solana/service.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChainTypeEnum, SupportedChainTypes
|
|
1
|
+
import { ChainTypeEnum, SupportedChainTypes } from "@tomo-inc/wallet-utils";
|
|
2
2
|
|
|
3
3
|
import { BaseService } from "../base/service";
|
|
4
4
|
|
|
@@ -31,8 +31,7 @@ export class SolanaService extends BaseService {
|
|
|
31
31
|
return fetch(url, { ...options });
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
|
-
const
|
|
35
|
-
const rpcUrl = `${domain}/rpc/v1/solana`;
|
|
34
|
+
const rpcUrl = "https://wallet.tomo.inc/rpc/v1/solana";
|
|
36
35
|
|
|
37
36
|
this.rpcUrl = rpcUrl;
|
|
38
37
|
this.connection = new Connection(rpcUrl, config);
|