diff --git a/nym-wallet/src/requests/index.ts b/nym-wallet/src/requests/index.ts index e8cc656611..3ab1128366 100644 --- a/nym-wallet/src/requests/index.ts +++ b/nym-wallet/src/requests/index.ts @@ -7,29 +7,23 @@ import { Gateway, MixNode, Operation, - TauriContractSettingsParams, + TauriContractStateParams, TauriTxResult, TCreateAccount, TDelegation, TSignInWithMnemonic, } from '../types' -export const createAccount = async (): Promise => - await invoke('create_new_account') +export const createAccount = async (): Promise => await invoke('create_new_account') -export const signInWithMnemonic = async ( - mnemonic: string, -): Promise => +export const signInWithMnemonic = async (mnemonic: string): Promise => await invoke('connect_with_mnemonic', { mnemonic }) -export const minorToMajor = async (amount: string): Promise => - await invoke('minor_to_major', { amount }) +export const minorToMajor = async (amount: string): Promise => await invoke('minor_to_major', { amount }) -export const majorToMinor = async (amount: string): Promise => - await invoke('major_to_minor', { amount }) +export const majorToMinor = async (amount: string): Promise => await invoke('major_to_minor', { amount }) -export const getGasFee = async (operation: Operation): Promise => - await invoke('get_fee', { operation }) +export const getGasFee = async (operation: Operation): Promise => await invoke('get_fee', { operation }) export const delegate = async ({ type, @@ -39,8 +33,7 @@ export const delegate = async ({ type: EnumNodeType identity: string amount: Coin -}): Promise => - await invoke(`delegate_to_${type}`, { identity, amount }) +}): Promise => await invoke(`delegate_to_${type}`, { identity, amount }) export const undelegate = async ({ type, @@ -48,19 +41,13 @@ export const undelegate = async ({ }: { type: EnumNodeType identity: string -}): Promise => - await invoke(`undelegate_from_${type}`, { identity }) +}): Promise => await invoke(`undelegate_from_${type}`, { identity }) -export const send = async (args: { - amount: Coin - address: string - memo: string -}): Promise => await invoke('send', args) -export const checkMixnodeOwnership = async (): Promise => - await invoke('owns_mixnode') +export const send = async (args: { amount: Coin; address: string; memo: string }): Promise => + await invoke('send', args) +export const checkMixnodeOwnership = async (): Promise => await invoke('owns_mixnode') -export const checkGatewayOwnership = async (): Promise => - await invoke('owns_gateway') +export const checkGatewayOwnership = async (): Promise => await invoke('owns_gateway') export const bond = async ({ type, @@ -70,21 +57,15 @@ export const bond = async ({ type: EnumNodeType data: MixNode | Gateway amount: Coin -}): Promise => await invoke(`bond_${type}`, { [type]: data, bond: amount }) +}): Promise => await invoke(`bond_${type}`, { [type]: data, pledge: amount }) -export const unbond = async (type: EnumNodeType) => - await invoke(`unbond_${type}`) +export const unbond = async (type: EnumNodeType) => await invoke(`unbond_${type}`) -export const userBalance = async (): Promise => - await invoke('get_balance') +export const userBalance = async (): Promise => await invoke('get_balance') -export const getContractParams = - async (): Promise => - await invoke('get_contract_settings') +export const getContractParams = async (): Promise => await invoke('get_contract_settings') -export const setContractParams = async ( - params: TauriContractSettingsParams, -): Promise => +export const setContractParams = async (params: TauriContractStateParams): Promise => await invoke('update_contract_settings', { params }) export const getReverseMixDelegations = async (): Promise => diff --git a/nym-wallet/src/routes/bond/BondForm.tsx b/nym-wallet/src/routes/bond/BondForm.tsx index a45ffb180a..cdace5a29f 100644 --- a/nym-wallet/src/routes/bond/BondForm.tsx +++ b/nym-wallet/src/routes/bond/BondForm.tsx @@ -27,6 +27,7 @@ type TBondFormFields = { ownerSignature: string identityKey: string sphinxKey: string + profitPercentage: number amount: string host: string version: string @@ -45,6 +46,7 @@ const defaultValues = { amount: '', host: '', version: '', + profitPercentage: 0, location: undefined, mixPort: 1789, verlocPort: 1790, @@ -179,7 +181,7 @@ export const BondForm = ({ /> - + + + + +