diff options
author | Sebastian <sebasjm@gmail.com> | 2023-06-16 09:40:57 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-06-16 09:40:57 -0300 |
commit | b2355a3fcb5d5912ec2b4596e5d383d93564897e (patch) | |
tree | 5671f475ff207a2aab80dd293bf67b1a8eaa1e1d /packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts | |
parent | 444c5427f41f8030b117a7d3589219abfa60bd1c (diff) | |
download | wallet-core-b2355a3fcb5d5912ec2b4596e5d383d93564897e.tar.xz |
remove testing ui
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts index b6d4f4cc2..41831a78a 100644 --- a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts +++ b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts @@ -49,63 +49,6 @@ export function useComponentState(props: Props): RecursiveState<State> { ); const [rawMode, setRawMode] = useState(false); - const [fee, setFee] = useState<any>({}); - useEffect(() => { - if (!amount) return; - - // const type = TransactionType.Deposit - [ - TransactionType.Deposit as const, - TransactionType.Withdrawal as const, - ].forEach((type) => { - Promise.all([ - api.wallet.call(WalletApiOperation.GetPlanForOperation, { - type, - mode: "effective", - account: "payto://iban/DE123", - instructedAmount: Amounts.stringify(amount), - }), - api.wallet.call(WalletApiOperation.GetPlanForOperation, { - type, - mode: "raw", - account: "payto://iban/DE123", - instructedAmount: Amounts.stringify(amount), - }), - ]).then(([effective1, raw1]) => { - Promise.all([ - api.wallet.call(WalletApiOperation.GetPlanForOperation, { - type, - mode: "raw", - instructedAmount: effective1.rawAmount, - account: "payto://iban/DE123", - }), - api.wallet.call(WalletApiOperation.GetPlanForOperation, { - type, - mode: "effective", - instructedAmount: raw1.effectiveAmount, - account: "payto://iban/DE123", - }), - ]).then(([effective2, raw2]) => { - setFee({ - ...fee, - [type]: { - effective: effective1, - raw: raw1, - // effective: { - // // first: effective1, - // // second: effective2, - // }, - // raw: { - // // first: raw1, - // // second: raw2, - // }, - }, - }); - }); - }); - }); - }, [amount?.value, amount?.fraction, rawMode]); - //FIXME: get this information from wallet // eslint-disable-next-line no-constant-condition const previous: Contact[] = true @@ -176,7 +119,6 @@ export function useComponentState(props: Props): RecursiveState<State> { return { status: "ready", error: undefined, - amounts: fee, mode: { button: { onClick: pushAlertOnError(async () => { @@ -223,7 +165,6 @@ export function useComponentState(props: Props): RecursiveState<State> { return { status: "ready", error: undefined, - amounts: fee, previous, mode: { button: { |