From d3df239896f3b65e5c89a23871df19953fa25c26 Mon Sep 17 00:00:00 2001 From: woodenfurniture <125113430+woodenfurniture@users.noreply.github.com> Date: Tue, 7 Jan 2025 11:47:42 +1100 Subject: [PATCH] chore: better readability for isPool decoding --- packages/utils/src/assetData/decodeAssetData.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/utils/src/assetData/decodeAssetData.ts b/packages/utils/src/assetData/decodeAssetData.ts index 7b0bb744cf4..1ea74354852 100644 --- a/packages/utils/src/assetData/decodeAssetData.ts +++ b/packages/utils/src/assetData/decodeAssetData.ts @@ -88,11 +88,13 @@ export const decodeAssetData = (encodedAssetData: EncodedAssetData) => { case 'symbol': asset.symbol = value as FieldToType[typeof field] break - case 'isPool': - if ((value as FieldToType[typeof field]) === 1) { + case 'isPool': { + const isPool = value as FieldToType[typeof field] + if (isPool) { asset.isPool = true } break + } case 'assetIdx': // Skip assetIdx as we already have assetId break