@swapkit/core 1.0.0-rc.83 → 1.0.0-rc.85

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.es.js CHANGED
@@ -647,6 +647,7 @@ const pt = {
647
647
  [l.SOURCE_ADDRESS_INVALID_FOR_SELL_CHAIN]: "Source address {0} invalid for sell chain.",
648
648
  [l.DESTINATION_ADDRESS_INVALID_FOR_BUY_CHAIN]: "Destination address {0} invalid for buy chain.",
649
649
  [l.PREFERRED_PROVIDER_NOT_SUPPORTED]: "Preferred provider not supported.",
650
+ [l.SOURCE_ADDRESS_SMART_CONTRACT]: "Source address is a smart contract.",
650
651
  [l.DESTINATION_ADDRESS_SMART_CONTRACT]: "Destination address is a smart contract.",
651
652
  [l.BUY_AMOUNT_MUST_BE_POSITIVE_INTEGER]: "Buy amount must be a positive integer.",
652
653
  [l.INVALID_PROVIDER]: "Invalid provider {0}.",
@@ -678,9 +679,11 @@ const pt = {
678
679
  [l.ADDRESS_ALREADY_CLAIMED]: "Address {0} already claimed the airdrop."
679
680
  }, ue = (e, t) => {
680
681
  let n = pt[e];
682
+ if (!n)
683
+ return "";
681
684
  for (let a = 0; a < t.length; a++)
682
- n = n.replace(`{${a}}`, t[a]);
683
- return t.length === 0 ? n.replace("{0}", "") : n;
685
+ n = (n == null ? void 0 : n.replace(`{${a}}`, t[a])) ?? "";
686
+ return n;
684
687
  };
685
688
  let Sn = class xe extends Error {
686
689
  constructor({
@@ -914,9 +917,9 @@ const ht = "0x313ce567", Ne = async ({ chain: e, to: t }) => {
914
917
  }
915
918
  }, gt = (e) => {
916
919
  switch (e) {
917
- case "ETH.THOR":
920
+ case `${s.Ethereum}.THOR`:
918
921
  return { identifier: "ETH.THOR-0xa5f2211b9b8170f694421f2046281775e8468044", decimal: 18 };
919
- case "ETH.vTHOR":
922
+ case `${s.Ethereum}.vTHOR`:
920
923
  return { identifier: "ETH.vTHOR-0x815c23eca83261b6ec689b60cc4a58b54bc24d8d", decimal: 18 };
921
924
  case s.Cosmos:
922
925
  return { identifier: "GAIA.ATOM", decimal: A[e] };
@@ -926,8 +929,10 @@ const ht = "0x313ce567", Ne = async ({ chain: e, to: t }) => {
926
929
  return { identifier: "BSC.BNB", decimal: A[e] };
927
930
  case s.Maya:
928
931
  return { identifier: "MAYA.CACAO", decimal: A.MAYA };
929
- case "MAYA.MAYA":
932
+ case `${s.Maya}.MAYA`:
930
933
  return { identifier: "MAYA.MAYA", decimal: 4 };
934
+ case `${s.Kujira}.USK`:
935
+ return { identifier: `${s.Kujira}.USK`, decimal: 6 };
931
936
  case s.Kujira:
932
937
  case s.Arbitrum:
933
938
  case s.Optimism: