demobank-ui: pass correct withdrawal ID instead of full URI
This commit is contained in:
parent
d11048b68c
commit
4dff3853c1
@ -14,7 +14,7 @@
|
|||||||
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Logger } from "@gnu-taler/taler-util";
|
import { Logger, parseWithdrawUri } from "@gnu-taler/taler-util";
|
||||||
import {
|
import {
|
||||||
HttpResponsePaginated,
|
HttpResponsePaginated,
|
||||||
useTranslationContext,
|
useTranslationContext,
|
||||||
@ -65,19 +65,23 @@ export function WithdrawalQRCode({
|
|||||||
return <Loading />;
|
return <Loading />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const parsedUri = parseWithdrawUri(talerWithdrawUri);
|
||||||
|
if (!parsedUri) {
|
||||||
|
throw Error("can't parse withdrawal URI");
|
||||||
|
}
|
||||||
|
|
||||||
if (!data.selection_done) {
|
if (!data.selection_done) {
|
||||||
return (
|
return (
|
||||||
<QrCodeSection talerWithdrawUri={talerWithdrawUri} onAbort={onAbort} />
|
<QrCodeSection talerWithdrawUri={talerWithdrawUri} onAbort={onAbort} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* Wallet POSTed the withdrawal details! Ask the
|
// Wallet POSTed the withdrawal details! Ask the
|
||||||
* user to authorize the operation (here CAPTCHA).
|
// user to authorize the operation (here CAPTCHA).
|
||||||
*/
|
|
||||||
return (
|
return (
|
||||||
<WithdrawalConfirmationQuestion
|
<WithdrawalConfirmationQuestion
|
||||||
account={account}
|
account={account}
|
||||||
withdrawalId={talerWithdrawUri}
|
withdrawalId={parsedUri.withdrawalOperationId}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user