From 94e9038c6fcdb2060d3e1208dbfaf9a98762654c Mon Sep 17 00:00:00 2001 From: Josh Siegel Date: Tue, 15 Nov 2022 14:26:42 +0000 Subject: [PATCH] WH-1921: add btc to array.ts @ Closes #1921 --- sdk/js/src/utils/array.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk/js/src/utils/array.ts b/sdk/js/src/utils/array.ts index 9e350ff52..ba84fa999 100644 --- a/sdk/js/src/utils/array.ts +++ b/sdk/js/src/utils/array.ts @@ -30,6 +30,7 @@ import { isEVMChain, isTerraChain, CHAIN_ID_XPLA, + CHAIN_ID_BTC, } from "./consts"; import { hashLookup } from "./near"; import { getExternalAddressFromType, isValidAptosType } from "./aptos"; @@ -112,6 +113,8 @@ export const tryUint8ArrayToNative = ( throw Error("uint8ArrayToNative: Aptos not supported yet."); } else if (chainId === CHAIN_ID_UNSET) { throw Error("uint8ArrayToNative: Chain id unset"); + } else if (chainId === CHAIN_ID_BTC) { + throw Error("uint8ArrayToNative: Btc not supported"); } else { // This case is never reached const _: never = chainId; @@ -242,6 +245,8 @@ export const tryNativeToHexString = ( throw Error("hexToNativeString: Osmosis not supported yet."); } else if (chainId === CHAIN_ID_SUI) { 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) { if (isValidAptosType(address)) { return getExternalAddressFromType(address);