aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/taler-wallet-webextension/src/wallet/Settings.tsx87
1 files changed, 56 insertions, 31 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Settings.tsx b/packages/taler-wallet-webextension/src/wallet/Settings.tsx
index 03e4dc64a..19b30dd5f 100644
--- a/packages/taler-wallet-webextension/src/wallet/Settings.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Settings.tsx
@@ -129,11 +129,13 @@ export function SettingsView({
}: ViewProps): VNode {
const { i18n, lang, supportedLang, changeLanguage } = useTranslationContext();
+ const api = useBackendContext();
+
return (
<Fragment>
<section>
<SubTitle>
- <i18n.Translate>Trust</i18n.Translate>
+ <i18n.Translate>Exchange Entries</i18n.Translate>
</SubTitle>
{!knownExchanges || !knownExchanges.length ? (
<div>
@@ -151,7 +153,10 @@ export function SettingsView({
<i18n.Translate>URL</i18n.Translate>
</th>
<th>
- <i18n.Translate>Term of Service</i18n.Translate>
+ <i18n.Translate>Terms of Service</i18n.Translate>
+ </th>
+ <th>
+ <i18n.Translate>Actions</i18n.Translate>
</th>
</tr>
</thead>
@@ -172,9 +177,7 @@ export function SettingsView({
</WarningText>
);
case ExchangeTosStatus.Proposed:
- return (
- <i18n.Translate>proposed</i18n.Translate>
- );
+ return <i18n.Translate>proposed</i18n.Translate>;
default:
return (
<DestructiveText>
@@ -194,6 +197,22 @@ export function SettingsView({
<td>
<Status />
</td>
+ <td>
+ <button
+ onClick={() => {
+ console.log(`force-updating ${e.exchangeBaseUrl}`);
+ api.wallet.call(
+ WalletApiOperation.UpdateExchangeEntry,
+ {
+ exchangeBaseUrl: e.exchangeBaseUrl,
+ force: true,
+ },
+ );
+ }}
+ >
+ Reload
+ </button>
+ </td>
</tr>
);
})}
@@ -208,32 +227,38 @@ export function SettingsView({
</LinkPrimary>
</div>
- {coreVersion && (<Fragment>
- {LibtoolVersion.compare(coreVersion.version, WALLET_CORE_SUPPORTED_VERSION)?.compatible ? undefined :
- <WarningBox>
- <i18n.Translate>
- The version of wallet core is not supported. (supported version: {WALLET_CORE_SUPPORTED_VERSION})
- </i18n.Translate>
- </WarningBox>}
- <EnabledBySettings name="advanceMode">
- <Part
- title={i18n.str`Exchange compatibility`}
- text={<span>{coreVersion.exchange}</span>}
- />
- <Part
- title={i18n.str`Merchant compatibility`}
- text={<span>{coreVersion.merchant}</span>}
- />
- <Part
- title={i18n.str`Bank compatibility`}
- text={<span>{coreVersion.bank}</span>}
- />
- <Part
- title={i18n.str`Wallet Core compatibility`}
- text={<span>{coreVersion.version}</span>}
- />
- </EnabledBySettings>
- </Fragment>
+ {coreVersion && (
+ <Fragment>
+ {LibtoolVersion.compare(
+ coreVersion.version,
+ WALLET_CORE_SUPPORTED_VERSION,
+ )?.compatible ? undefined : (
+ <WarningBox>
+ <i18n.Translate>
+ The version of wallet core is not supported. (supported
+ version: {WALLET_CORE_SUPPORTED_VERSION})
+ </i18n.Translate>
+ </WarningBox>
+ )}
+ <EnabledBySettings name="advanceMode">
+ <Part
+ title={i18n.str`Exchange compatibility`}
+ text={<span>{coreVersion.exchange}</span>}
+ />
+ <Part
+ title={i18n.str`Merchant compatibility`}
+ text={<span>{coreVersion.merchant}</span>}
+ />
+ <Part
+ title={i18n.str`Bank compatibility`}
+ text={<span>{coreVersion.bank}</span>}
+ />
+ <Part
+ title={i18n.str`Wallet Core compatibility`}
+ text={<span>{coreVersion.version}</span>}
+ />
+ </EnabledBySettings>
+ </Fragment>
)}
<SubTitle>
<i18n.Translate>Advance mode</i18n.Translate>