Skip to content

Commit

Permalink
Merge pull request #216 from enkryptcom/develop
Browse files Browse the repository at this point in the history
Release: v1.10.2
  • Loading branch information
kvhnuke authored Jan 18, 2023
2 parents c3560e1 + 69fd815 commit 530b141
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/extension/package.json
Original file line number Diff line number Diff line change
@@ -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 *;",
Expand Down
2 changes: 2 additions & 0 deletions packages/extension/src/providers/ethereum/ui/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ export interface SignerMessageOptions {
network: BaseNetwork;
account: EnkryptAccount;
}

export { GasFeeInfo };
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}>();
Expand All @@ -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()
);
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -352,8 +352,8 @@ const selectToken = (token: SubstrateToken | Partial<SubstrateToken>) => {
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(() => {
Expand Down Expand Up @@ -397,6 +397,8 @@ const isDisabled = () => {
}
if (
amount.value !== undefined &&
amount.value !== "" &&
hasEnough.value &&
addressIsValid &&
!edWarn.value &&
Expand Down

2 comments on commit 530b141

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.