@swapkit/helpers 1.0.0-rc.60 → 1.0.0-rc.62

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.
@@ -5,7 +5,12 @@ import { RequestClient } from '../index.ts';
5
5
 
6
6
  const getDecimalMethodHex = '0x313ce567';
7
7
 
8
- export type CommonAssetString = 'MAYA.MAYA' | 'ETH.THOR' | 'ETH.vTHOR' | Chain;
8
+ export type CommonAssetString =
9
+ | `${Chain.Maya}.MAYA`
10
+ | `${Chain.Ethereum}.THOR`
11
+ | `${Chain.Ethereum}.vTHOR`
12
+ | `${Chain.Kujira}.USK`
13
+ | Chain;
9
14
 
10
15
  const getContractDecimals = async ({ chain, to }: { chain: EVMChain; to: string }) => {
11
16
  try {
@@ -108,9 +113,9 @@ export const getCommonAssetInfo = (
108
113
  assetString: CommonAssetString,
109
114
  ): { identifier: string; decimal: number } => {
110
115
  switch (assetString) {
111
- case 'ETH.THOR':
116
+ case `${Chain.Ethereum}.THOR`:
112
117
  return { identifier: 'ETH.THOR-0xa5f2211b9b8170f694421f2046281775e8468044', decimal: 18 };
113
- case 'ETH.vTHOR':
118
+ case `${Chain.Ethereum}.vTHOR`:
114
119
  return { identifier: 'ETH.vTHOR-0x815c23eca83261b6ec689b60cc4a58b54bc24d8d', decimal: 18 };
115
120
 
116
121
  case Chain.Cosmos:
@@ -121,9 +126,12 @@ export const getCommonAssetInfo = (
121
126
  return { identifier: 'BSC.BNB', decimal: BaseDecimal[assetString] };
122
127
  case Chain.Maya:
123
128
  return { identifier: 'MAYA.CACAO', decimal: BaseDecimal.MAYA };
124
- case 'MAYA.MAYA':
129
+ case `${Chain.Maya}.MAYA`:
125
130
  return { identifier: 'MAYA.MAYA', decimal: 4 };
126
131
 
132
+ case `${Chain.Kujira}.USK`:
133
+ return { identifier: `${Chain.Kujira}.USK`, decimal: 6 };
134
+
127
135
  case Chain.Kujira:
128
136
  case Chain.Arbitrum:
129
137
  case Chain.Optimism: