commit c8d6a37e2c54e0c1c4e56759017b0623ce9851cb
parent 023c3ee36051d42568fdd752c5c3a80275d27bf2
Author: Sebastian <sebasjm@gmail.com>
Date: Mon, 26 May 2025 19:16:24 -0300
fix #10033
Diffstat:
3 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/packages/taler-wallet-webextension/build.mjs b/packages/taler-wallet-webextension/build.mjs
@@ -20,7 +20,7 @@ import linaria from "@linaria/esbuild";
import { shakerPlugin } from "@linaria/shaker";
await build({
- type: "production",
+ type: process.env.DEV ? "developmet":"production",
importMeta: import.meta,
source: {
js: [
diff --git a/packages/taler-wallet-webextension/set-up-dev-wallet.sh b/packages/taler-wallet-webextension/set-up-dev-wallet.sh
@@ -22,6 +22,8 @@ cp -r static $TEMP_DIR/static
cp -r static-dev $TEMP_DIR/static
mkdir $TEMP_DIR/dist
+DEV=1 INSTALL_DIR=$TEMP_DIR/dist ./build.mjs
+
(cd $TEMP_DIR && zip -q -r "../$zipfile" dist static manifest.json)
# Create version form Manifest v3
@@ -34,8 +36,10 @@ cp -r static-dev $TEMP_DIR/static
mkdir $TEMP_DIR/dist
cp -r service_worker.js $TEMP_DIR
+DEV=1 INSTALL_DIR=$TEMP_DIR/dist ./build.mjs
+
(cd $TEMP_DIR && zip -q -r "../$zipfile" dist static manifest.json service_worker.js)
echo now run the development server
echo FOR v3: 'INSTALL_DIR=$PWD/extension-dev/v3/dist ./dev.mjs'
-echo FOR v2: 'INSTALL_DIR=$PWD/extension-dev/v2/dist ./dev.mjs'
-\ No newline at end of file
+echo FOR v2: 'INSTALL_DIR=$PWD/extension-dev/v2/dist ./dev.mjs'
diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts
@@ -48,10 +48,6 @@ export function useComponentStateFromParams({
// const paramsAmount = amount ? Amounts.parse(amount) : undefined;
const [updatedExchangeByUser, setUpdatedExchangeByUser] = useState<string>();
const uriInfoHook = useAsyncAsHook(async () => {
- const exchanges = await api.wallet.call(
- WalletApiOperation.ListExchanges,
- {},
- );
const uri = maybeTalerUri
? parseWithdrawExchangeUri(maybeTalerUri)
: undefined;
@@ -75,6 +71,12 @@ export function useComponentStateFromParams({
ex = info.exchange;
}
+
+ const exchanges = await api.wallet.call(
+ WalletApiOperation.ListExchanges,
+ {},
+ );
+
const chosenAmount =
!uri || !uri.amount ? undefined : Amounts.parse(uri.amount);
return { amount: chosenAmount, exchanges, exchange: ex };