sdk/js: Add sei native denom check to isNativeCosmWasmDenom (#3071)
This commit is contained in:
parent
88ddb1d9e2
commit
12fc66cc97
|
@ -4,6 +4,7 @@ import { keccak256 } from "ethers/lib/utils";
|
||||||
import { isNativeDenom } from "../terra";
|
import { isNativeDenom } from "../terra";
|
||||||
import {
|
import {
|
||||||
CHAIN_ID_INJECTIVE,
|
CHAIN_ID_INJECTIVE,
|
||||||
|
CHAIN_ID_SEI,
|
||||||
CHAIN_ID_TERRA,
|
CHAIN_ID_TERRA,
|
||||||
CHAIN_ID_XPLA,
|
CHAIN_ID_XPLA,
|
||||||
coalesceCosmWasmChainId,
|
coalesceCosmWasmChainId,
|
||||||
|
@ -14,6 +15,7 @@ import {
|
||||||
|
|
||||||
export const isNativeDenomInjective = (denom: string) => denom === "inj";
|
export const isNativeDenomInjective = (denom: string) => denom === "inj";
|
||||||
export const isNativeDenomXpla = (denom: string) => denom === "axpla";
|
export const isNativeDenomXpla = (denom: string) => denom === "axpla";
|
||||||
|
export const isNativeDenomSei = (denom: string) => denom === "usei";
|
||||||
|
|
||||||
export function isNativeCosmWasmDenom(
|
export function isNativeCosmWasmDenom(
|
||||||
chainId: CosmWasmChainId,
|
chainId: CosmWasmChainId,
|
||||||
|
@ -22,7 +24,8 @@ export function isNativeCosmWasmDenom(
|
||||||
return (
|
return (
|
||||||
(isTerraChain(chainId) && isNativeDenom(address)) ||
|
(isTerraChain(chainId) && isNativeDenom(address)) ||
|
||||||
(chainId === CHAIN_ID_INJECTIVE && isNativeDenomInjective(address)) ||
|
(chainId === CHAIN_ID_INJECTIVE && isNativeDenomInjective(address)) ||
|
||||||
(chainId === CHAIN_ID_XPLA && isNativeDenomXpla(address))
|
(chainId === CHAIN_ID_XPLA && isNativeDenomXpla(address)) ||
|
||||||
|
(chainId === CHAIN_ID_SEI && isNativeDenomSei(address))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue