diff --git a/packages/extension/package.json b/packages/extension/package.json index f43bd693a..c07bdda4a 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -1,6 +1,6 @@ { "name": "@enkryptcom/extension", - "version": "1.10.1", + "version": "1.10.2", "private": true, "scripts": { "zip": "cd dist; zip -r release.zip *;", diff --git a/packages/extension/src/providers/ethereum/ui/types.ts b/packages/extension/src/providers/ethereum/ui/types.ts index 05f860589..e691997dc 100644 --- a/packages/extension/src/providers/ethereum/ui/types.ts +++ b/packages/extension/src/providers/ethereum/ui/types.ts @@ -36,3 +36,5 @@ export interface SignerMessageOptions { network: BaseNetwork; account: EnkryptAccount; } + +export { GasFeeInfo }; diff --git a/packages/extension/src/providers/polkadot/networks/astar/shiden.ts b/packages/extension/src/providers/polkadot/networks/astar/shiden.ts index 4b615082a..a222b6422 100644 --- a/packages/extension/src/providers/polkadot/networks/astar/shiden.ts +++ b/packages/extension/src/providers/polkadot/networks/astar/shiden.ts @@ -23,7 +23,7 @@ const shidenOptions: SubstrateNetworkOptions = { prefix: 5, gradient: "linear-gradient(326.87deg, #645AFF 12.53%, #E40C5B 50.89%, #FF4C3B 89.24%)", - node: "wss://shiden.public.blastapi.io", + node: "wss://shiden.api.onfinality.io/public-ws", coingeckoID: "shiden", coingeckoPlatform: CoingeckoPlatform.Shiden, existentialDeposit: toBN("1000000"), diff --git a/packages/extension/src/providers/polkadot/ui/send-transaction/components/send-input-amount.vue b/packages/extension/src/providers/polkadot/ui/send-transaction/components/send-input-amount.vue index db8b01d07..535dcd24e 100644 --- a/packages/extension/src/providers/polkadot/ui/send-transaction/components/send-input-amount.vue +++ b/packages/extension/src/providers/polkadot/ui/send-transaction/components/send-input-amount.vue @@ -27,7 +27,7 @@ import SwitchArrowIcon from "@action/icons/send/switch-arrow-icon.vue"; import BigNumber from "bignumber.js"; const emit = defineEmits<{ - (e: "update:inputAmount", address: string): void; + (e: "update:inputAmount", address: string | undefined): void; (e: "update:inputSetMax", max: boolean): void; }>(); @@ -53,7 +53,10 @@ const fiatEquivalent = computed(() => { const amount = computed({ get: () => props.amount, set: (value) => { - emit("update:inputAmount", new BigNumber(value).toFixed()); + emit( + "update:inputAmount", + value ? new BigNumber(value).toFixed() : value.toString() + ); }, }); diff --git a/packages/extension/src/providers/polkadot/ui/send-transaction/index.vue b/packages/extension/src/providers/polkadot/ui/send-transaction/index.vue index 515c0f005..6efe4aae6 100644 --- a/packages/extension/src/providers/polkadot/ui/send-transaction/index.vue +++ b/packages/extension/src/providers/polkadot/ui/send-transaction/index.vue @@ -182,7 +182,7 @@ const edWarn = computed(() => { } const rawAmount = toBN( - toBase(amount.value.toString(), selectedAsset.value.decimals!) + toBase(amount.value.toString(), selectedAsset.value.decimals ?? 0) ); const ed = selectedAsset.value.existentialDeposit ?? toBN(0); const userBalance = toBN(selectedAsset.value.balance ?? 0); @@ -217,7 +217,7 @@ onMounted(() => { watch([selectedAsset, amount, addressTo], async () => { if (selectedAsset.value && isAddress.value) { - if (!isValidDecimals(amount.value ?? "0", selectedAsset.value.decimals!)) { + if (!isValidDecimals(amount.value || "0", selectedAsset.value.decimals!)) { hasEnough.value = false; return; } @@ -352,8 +352,8 @@ const selectToken = (token: SubstrateToken | Partial) => { isOpenSelectToken.value = false; }; -const inputAmount = (number: string) => { - amount.value = parseFloat(number) < 0 ? "0" : number; +const inputAmount = (number: string | undefined) => { + amount.value = number ? (parseFloat(number) < 0 ? "0" : number) : number; }; const sendButtonTitle = computed(() => { @@ -397,6 +397,8 @@ const isDisabled = () => { } if ( + amount.value !== undefined && + amount.value !== "" && hasEnough.value && addressIsValid && !edWarn.value &&