Skip to content

Commit

Permalink
Merge branch 'done' into release-4.44.0
Browse files Browse the repository at this point in the history
  • Loading branch information
benma committed Sep 15, 2024
2 parents 262a98e + 15e4df2 commit 84e75d4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
9 changes: 5 additions & 4 deletions frontends/web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontends/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"react-i18next": "14.1.2",
"react-router-dom": "6.4.3",
"react-select": "5.8.0",
"request-address": "0.0.9"
"request-address": "0.0.10"
},
"eslintConfig": {
"extends": [
Expand Down
5 changes: 5 additions & 0 deletions frontends/web/src/routes/exchange/pocket.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import { useTranslation } from 'react-i18next';
import { useState, useEffect, createRef } from 'react';
import { useNavigate } from 'react-router-dom';
import { RequestAddressV0Message, MessageVersion, parseMessage, serializeMessage, V0MessageType, PaymentRequestV0Message } from 'request-address';
import { getConfig } from '@/utils/config';
import { Dialog } from '@/components/dialog/dialog';
Expand All @@ -40,6 +41,7 @@ interface TProps {

export const Pocket = ({ code, action }: TProps) => {
const { t } = useTranslation();
const navigate = useNavigate();

const [height, setHeight] = useState(0);
const [iframeLoaded, setIframeLoaded] = useState(false);
Expand Down Expand Up @@ -259,6 +261,9 @@ export const Pocket = ({ code, action }: TProps) => {
case V0MessageType.PaymentRequest:
handlePaymentRequest(message);
break;
case V0MessageType.Close:
navigate(`/account/${code}`, { replace: true });
break;
}
} catch (e) {
console.log(e);
Expand Down

0 comments on commit 84e75d4

Please sign in to comment.