Skip to content

Commit

Permalink
Update wording, fix bug with sending non exportto conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeltout committed Oct 12, 2023
1 parent b39cc99 commit 9ac6a9e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -879,11 +879,9 @@ const ConvertOrCrossChainSendForm = ({ setLoading, setModalHeight, updateSendFor
}

if (
(coinObj.proto === 'vrsc' &&
coinObj.proto === 'vrsc' &&
output.exportto != null &&
output.exportto.toLowerCase() ===
toIAddress(VETH, coinObj.testnet ? 'VRSCTEST' : 'VRSC').toLowerCase()) ||
output.exportto.toLowerCase() === 'veth'
(output.exportto.toLowerCase() === toIAddress(VETH, coinObj.testnet ? 'VRSCTEST' : 'VRSC').toLowerCase() || output.exportto.toLowerCase() === 'veth')
) {
try {
const provider = getWeb3ProviderForNetwork(
Expand Down
2 changes: 1 addition & 1 deletion src/utils/api/channels/erc20/requests/preflight.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export const preflightBridgeTransfer = async (coinObj, channelId, activeUser, ou
throw new Error("Failed to find a currency mapped to sending erc20 token that can be converted");
}
} else {
throw new Error("Cannot send to Verus network without a mapped currency");
throw new Error("Cannot send to Verus network without a mapped currency, please select a currency to receive as");
}

const toEthAddress = (iAddr) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { getCurrency } from "../../verusid/callCreators";
import { coinsToSats } from "../../../../math";

export const calculateCurrencyTransferFee = async (systemId, currency, exportto, convertto, feecurrency, via, source, address) => {
if (feecurrency !== systemId && exportto == null) {
if (feecurrency === systemId && exportto == null) {
return "25000";
} else {
const { error, result: destinationSystem } = await getCurrency(systemId, exportto);
Expand Down

0 comments on commit 9ac6a9e

Please sign in to comment.