Skip to content

Commit

Permalink
hotfix: assert undefined ss58 prefix correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelm41 committed Jul 1, 2024
1 parent 88ac2c1 commit d79fc5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/getProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ export async function getProperties(api: ApiPromise): Promise<ChainProps> {
const specName = api.runtimeVersion.specName.toString()
const specVersion = api.runtimeVersion.specVersion.toNumber()

if (!base58Prefix) {
if (base58Prefix === undefined) {
throw new ChainError('the base58 prefix was not found for this chain')
}

if (!decimals) {
if (decimals === undefined) {
throw new ChainError('the chain decimals were not found for this chain')
}

if (!tokenSymbol) {
if (tokenSymbol === undefined || tokenSymbol === '') {
throw new ChainError('the token symbol was not found for this chain')
}

Expand Down

0 comments on commit d79fc5b

Please sign in to comment.