Skip to content

Commit

Permalink
Add more descriptive error message if failed to find destination addr…
Browse files Browse the repository at this point in the history
… VerusID
  • Loading branch information
michaeltout committed Dec 8, 2024
1 parent 451620c commit bce34e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ const ConvertOrCrossChainSendForm = ({ setLoading, setModalHeight, updateSendFor
if (addr.endsWith("@")) {
const identityRes = await getIdentity(coinObj, activeAccount, channel, addr);

if (identityRes.error) throw new Error("Failed to fetch " + addr);
if (identityRes.error) throw new Error(`Failed to get information about ${addr}. Try using the i-address of this VerusID.`);

keyhash = identityRes.result.identity.identityaddress;
} else keyhash = addr;
Expand Down
4 changes: 2 additions & 2 deletions src/utils/api/channels/vrpc/requests/preflight.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const preflight = async (coinObj, activeUser, address, amount, params, ch
if (addr.endsWith("@")) {
const identityRes = await getIdentity(systemId, addr);

if (identityRes.error) throw new Error("Failed to fetch " + addr);
if (identityRes.error) throw new Error(`Failed to get information about ${addr}. Try using the i-address of this VerusID.`);

keyhash = identityRes.result.identity.identityaddress;
} else keyhash = addr;
Expand Down Expand Up @@ -584,7 +584,7 @@ export const preflightCurrencyTransfer = async (coinObj, channelId, activeUser,
const nativeFeeAmount = satsToCoins(nativeFeesPaid).toString();

message = `Insufficient funds. Ensure you have at least ${
output.feecurrency === systemId
(output.feecurrency == null || output.feecurrency === systemId)
? nativeFeeAmount
: satsToCoins(BigNumber(_feeamount)).toString()
} ${feeCurrencyName} on the ${systemName} network to fund the fee for transaction.`;
Expand Down

0 comments on commit bce34e0

Please sign in to comment.