Convert the nym into unym
This commit is contained in:
parent
08af9ba20d
commit
acf0d1fc17
@ -82,6 +82,10 @@ export const useWebViewHandler = () => {
|
||||
};
|
||||
|
||||
try {
|
||||
const unymAmount = chainSpecs.chainId === 'nyx'
|
||||
? Math.round(parseFloat(amount) * 1_000_000).toString()
|
||||
: amount;
|
||||
|
||||
// Get all accounts
|
||||
const chainAccounts = await retrieveAccountsForNetwork(
|
||||
`${chainSpecs.namespace}:${chainSpecs.chainId}`,
|
||||
@ -96,10 +100,9 @@ export const useWebViewHandler = () => {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const chainAccount = chainAccounts[0]; // Use the first account
|
||||
|
||||
const path = `/transfer/${chainSpecs.namespace}/${chainSpecs.chainId}/${chainAccount.address}/${to}/${amount}`;
|
||||
const path = `/transfer/${chainSpecs.namespace}/${chainSpecs.chainId}/${chainAccount.address}/${to}/${unymAmount}`;
|
||||
|
||||
navigation.reset({
|
||||
index: 0,
|
||||
@ -113,7 +116,7 @@ export const useWebViewHandler = () => {
|
||||
transaction: {
|
||||
from: chainAccount.address,
|
||||
to: to,
|
||||
value: amount,
|
||||
value: unymAmount,
|
||||
data: ''
|
||||
},
|
||||
accountInfo: chainAccount,
|
||||
|
Loading…
Reference in New Issue
Block a user