WH-1921: add btc to array.ts @ Closes #1921

This commit is contained in:
Josh Siegel 2022-11-15 14:26:42 +00:00 committed by jumpsiegel
parent 44ecc2cd8d
commit 94e9038c6f
1 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,7 @@ import {
isEVMChain, isEVMChain,
isTerraChain, isTerraChain,
CHAIN_ID_XPLA, CHAIN_ID_XPLA,
CHAIN_ID_BTC,
} from "./consts"; } from "./consts";
import { hashLookup } from "./near"; import { hashLookup } from "./near";
import { getExternalAddressFromType, isValidAptosType } from "./aptos"; import { getExternalAddressFromType, isValidAptosType } from "./aptos";
@ -112,6 +113,8 @@ export const tryUint8ArrayToNative = (
throw Error("uint8ArrayToNative: Aptos not supported yet."); throw Error("uint8ArrayToNative: Aptos not supported yet.");
} else if (chainId === CHAIN_ID_UNSET) { } else if (chainId === CHAIN_ID_UNSET) {
throw Error("uint8ArrayToNative: Chain id unset"); throw Error("uint8ArrayToNative: Chain id unset");
} else if (chainId === CHAIN_ID_BTC) {
throw Error("uint8ArrayToNative: Btc not supported");
} else { } else {
// This case is never reached // This case is never reached
const _: never = chainId; const _: never = chainId;
@ -242,6 +245,8 @@ export const tryNativeToHexString = (
throw Error("hexToNativeString: Osmosis not supported yet."); throw Error("hexToNativeString: Osmosis not supported yet.");
} else if (chainId === CHAIN_ID_SUI) { } else if (chainId === CHAIN_ID_SUI) {
throw Error("hexToNativeString: Sui not supported yet."); throw Error("hexToNativeString: Sui not supported yet.");
} else if (chainId === CHAIN_ID_BTC) {
throw Error("hexToNativeString: Btc not supported yet.");
} else if (chainId === CHAIN_ID_APTOS) { } else if (chainId === CHAIN_ID_APTOS) {
if (isValidAptosType(address)) { if (isValidAptosType(address)) {
return getExternalAddressFromType(address); return getExternalAddressFromType(address);