Skip to content

Commit

Permalink
fix: insufficient sol
Browse files Browse the repository at this point in the history
  • Loading branch information
ieow committed Nov 26, 2024
1 parent 4641a2b commit b6b3ba9
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/pages/wallet/Transfer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,17 @@ const confirmTransfer = async () => {
});
} catch (error) {
log.error(error);
showMessageModal({
messageTitle: `${t("walletTransfer.submitFailed")}: ${(error as Error)?.message || t("walletSettings.somethingWrong")}`,
messageStatus: STATUS.ERROR,
});
if ((error as Error).message.match("found no record of a prior credit")) {
showMessageModal({
messageTitle: t("walletTransfer.insufficientSol"),
messageStatus: STATUS.ERROR,
});
} else {
showMessageModal({
messageTitle: `${t("walletTransfer.submitFailed")}: ${(error as Error)?.message || t("walletSettings.somethingWrong")}`,
messageStatus: STATUS.ERROR,
});
}
}
};
Expand Down

0 comments on commit b6b3ba9

Please sign in to comment.