[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 03/03: remove testing ui
From: |
gnunet |
Subject: |
[taler-wallet-core] 03/03: remove testing ui |
Date: |
Fri, 16 Jun 2023 14:41:06 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
commit b2355a3fcb5d5912ec2b4596e5d383d93564897e
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Fri Jun 16 09:40:57 2023 -0300
remove testing ui
---
.../src/wallet/DestinationSelection/index.ts | 1 -
.../src/wallet/DestinationSelection/state.ts | 59 ----------------------
.../src/wallet/DestinationSelection/views.tsx | 4 --
3 files changed, 64 deletions(-)
diff --git
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/index.ts
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/index.ts
index e3f4a89cb..e0f5869ff 100644
---
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/index.ts
+++
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/index.ts
@@ -75,7 +75,6 @@ export namespace State {
goToBank: ButtonHandler;
goToWallet: ButtonHandler;
amountHandler: AmountFieldHandler;
- amounts: any;
mode: ToggleHandler;
}
}
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: {
diff --git
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/views.tsx
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/views.tsx
index 2c862202a..246e42fbb 100644
---
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/views.tsx
+++
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/views.tsx
@@ -194,7 +194,6 @@ export function ReadyView(props: State.Ready): VNode {
export function ReadyGetView({
amountHandler,
goToBank,
- amounts,
mode,
goToWallet,
selectCurrency,
@@ -207,7 +206,6 @@ export function ReadyGetView({
<h1>
<i18n.Translate>Specify the amount and the origin2</i18n.Translate>
</h1>
- <pre>{JSON.stringify(amounts["withdrawal"], undefined, 2)}</pre>
<Grid container columns={2} justifyContent="space-between">
<AmountField
label={i18n.str`Amount`}
@@ -293,7 +291,6 @@ export function ReadyGetView({
}
export function ReadySendView({
amountHandler,
- amounts,
goToBank,
goToWallet,
previous,
@@ -306,7 +303,6 @@ export function ReadySendView({
<h1>
<i18n.Translate>Specify the amount and the destination</i18n.Translate>
</h1>
- <pre>{JSON.stringify(amounts["deposit"], undefined, 2)}</pre>
<Grid container columns={2} justifyContent="space-between">
<AmountField
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.