diff options
| author | Özgür Kesim <oec-taler@kesim.org> | 2023-08-31 13:12:06 +0200 |
|---|---|---|
| committer | Özgür Kesim <oec-taler@kesim.org> | 2023-08-31 13:12:06 +0200 |
| commit | 94cfcc875065f988815c31aaf8ebf36f75ac5983 (patch) | |
| tree | 8389a638c67a3ae2d57fb354da1df6378e82113f /packages/taler-wallet-webextension/src/cta/Withdraw/state.ts | |
| parent | e02a4eb990c8c54662fbb658695312bdfce492e0 (diff) | |
| parent | 79973a63dd31c0d84b677a2a1511b1dffc6218b8 (diff) | |
Merge branch 'master' into age-withdraw
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Withdraw/state.ts')
| -rw-r--r-- | packages/taler-wallet-webextension/src/cta/Withdraw/state.ts | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts index 46a72ac87..72cabe5a4 100644 --- a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts +++ b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts @@ -141,8 +141,8 @@ export function useComponentStateFromParams({ confirm: { onClick: isValid ? pushAlertOnError(async () => { - onAmountChanged(Amounts.stringify(amount)); - }) + onAmountChanged(Amounts.stringify(amount)); + }) : undefined, }, amount: { @@ -304,8 +304,8 @@ function exchangeSelectionState( const [ageRestricted, setAgeRestricted] = useState(0); const currentExchange = selectedExchange.selected; const tosNeedToBeAccepted = - currentExchange.tosStatus == ExchangeTosStatus.New || - currentExchange.tosStatus == ExchangeTosStatus.Changed; + currentExchange.tosStatus == ExchangeTosStatus.Pending || + currentExchange.tosStatus == ExchangeTosStatus.Proposed; /** * With the exchange and amount, ask the wallet the information @@ -393,12 +393,12 @@ function exchangeSelectionState( //TODO: calculate based on exchange info const ageRestriction = ageRestrictionEnabled ? { - list: ageRestrictionOptions, - value: String(ageRestricted), - onChange: pushAlertOnError(async (v: string) => - setAgeRestricted(parseInt(v, 10)), - ), - } + list: ageRestrictionOptions, + value: String(ageRestricted), + onChange: pushAlertOnError(async (v: string) => + setAgeRestricted(parseInt(v, 10)), + ), + } : undefined; return { |
