@tomo-inc/chains-service 0.0.25 → 0.0.26

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 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: `${domain}/quote`,
3918
+ txBaseUrl: `${txDomain}/quote`,
3915
3919
  tokenBaseUrl: `${domain}/token`,
3916
3920
  userBaseUrl: `${domain}/user/api`
3917
3921
  };
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: `${domain}/quote`,
3910
+ txBaseUrl: `${txDomain}/quote`,
3907
3911
  tokenBaseUrl: `${domain}/token`,
3908
3912
  userBaseUrl: `${domain}/user/api`
3909
3913
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomo-inc/chains-service",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "author": "tomo.inc",
5
5
  "license": "MIT",
6
6
  "private": false,
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: `${domain}/quote`,
16
+ txBaseUrl: `${txDomain}/quote`,
12
17
  tokenBaseUrl: `${domain}/token`,
13
18
  userBaseUrl: `${domain}/user/api`,
14
19
  };