Skip to content

Commit

Permalink
Merge pull request #455 from torusresearch/fix/spl_tranfer
Browse files Browse the repository at this point in the history
fix: insufficient sol
  • Loading branch information
ieow authored Nov 27, 2024
2 parents 4641a2b + b6b3ba9 commit 7e7c9d1
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 7e7c9d1

Please sign in to comment.