Skip to content

Commit

Permalink
Merge branch 'fix/swap-actual-receive-amount' into tmp/20240731
Browse files Browse the repository at this point in the history
  • Loading branch information
vvvvvv1vvvvvv committed Aug 1, 2024
2 parents bf50c91 + 293c716 commit a39380c
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 20 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@
"@rabby-wallet/eth-trezor-keyring": "2.5.1",
"@rabby-wallet/eth-walletconnect-keyring": "2.1.3",
"@rabby-wallet/eth-watch-keyring": "1.0.0",
"@rabby-wallet/gnosis-sdk": "1.3.7",
"@rabby-wallet/gnosis-sdk": "1.3.8",
"@rabby-wallet/page-provider": "0.4.0",
"@rabby-wallet/rabby-api": "^0.7.24-alpha.3",
"@rabby-wallet/rabby-api": "0.7.24",
"@rabby-wallet/rabby-security-engine": "2.0.5",
"@rabby-wallet/rabby-swap": "0.0.38",
"@rabby-wallet/widgets": "1.0.9",
Expand Down
1 change: 1 addition & 0 deletions src/constant/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1375,6 +1375,7 @@ export const GNOSIS_SUPPORT_CHAINS = ensureChainListValid([
CHAINS_ENUM.ERA,
CHAINS_ENUM.SCRL,
CHAINS_ENUM.LINEA,
'XLAYER' as CHAINS_ENUM,
]);

export const COBO_ARGUS_SUPPORT_CHAINS = ensureChainListValid([
Expand Down
12 changes: 6 additions & 6 deletions src/ui/component/QRCodeReader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ const QRCodeReader = ({
const checkCameraPermission = async () => {
const devices = await window.navigator.mediaDevices.enumerateDevices();
const webcams = devices.filter((device) => device.kind === 'videoinput');
// const hasWebcamPermissions = webcams.some(
// (webcam) => webcam.label && webcam.label.length > 0
// );
// if (!hasWebcamPermissions) {
// openInternalPageInTab('request-permission?type=camera');
// }
const hasWebcamPermissions = webcams.some(
(webcam) => webcam.label && webcam.label.length > 0
);
if (!hasWebcamPermissions) {
openInternalPageInTab('request-permission?type=camera');
}
};
useEffect(() => {
checkCameraPermission();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ import {
import { CurrentConnection } from '../CurrentConnection';
import { Settings } from '../index';
import './style.less';
import { CHAINS_ENUM, ThemeIconType } from '@/constant';
import { CHAINS_ENUM, ThemeIconType, KEYRING_TYPE } from '@/constant';
import { useAsync } from 'react-use';
import { useRabbySelector } from '@/ui/store';
import { GasPriceBar } from '../GasPriceBar';
import { ClaimRabbyFreeGasBadgeModal } from '../ClaimRabbyBadgeModal/freeGasBadgeModal';
import { useTranslation } from 'react-i18next';
import ThemeIcon from '@/ui/component/ThemeMode/ThemeIcon';
import { EcologyPopup } from '../EcologyPopup';
import { appIsDev } from '@/utils/env';

export default ({
gnosisPendingCount,
Expand Down Expand Up @@ -105,7 +106,10 @@ export default ({
const [approvalRiskAlert, setApprovalRiskAlert] = useState(0);

const { value: approvalState } = useAsync(async () => {
if (account?.address) {
if (
account?.address &&
(account.type !== KEYRING_TYPE.WatchAddressKeyring || appIsDev)
) {
const data = await wallet.openapi.approvalStatus(account.address);
return data;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { validateEOASign, validateETHSign } from 'ui/utils/gnosis';
import { splitNumberByStep } from 'ui/utils/number';
import { ReplacePopup } from './components/ReplacePopup';
import './style.less';
import { findChainByID } from '@/utils/chain';
import { findChain, findChainByID } from '@/utils/chain';
import { getTokenSymbol } from '@/ui/utils/token';
import { useRequest } from 'ahooks';
import { getProtocol } from '../Approval/components/Actions/utils';
Expand Down Expand Up @@ -511,7 +511,10 @@ export const GnosisTransactionQueueList = (props: {
loading?: boolean;
}) => {
const { usefulChain: chain, pendingTxs, loading } = props;
const networkId = CHAINS[chain].network;
const networkId =
findChain({
enum: chain,
})?.network || '';
const wallet = useWallet();
// const [safeInfo, setSafeInfo] = useState<SafeInfo | null>(null);
const { t } = useTranslation();
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4681,10 +4681,10 @@
events "^3.3.0"
web3-utils "^1.6.0"

"@rabby-wallet/[email protected].7":
version "1.3.7"
resolved "https://registry.yarnpkg.com/@rabby-wallet/gnosis-sdk/-/gnosis-sdk-1.3.7.tgz#310fdf75e7042b7ad3466a6ca47505915858a41e"
integrity sha512-+P2oBOSViZxERwbnakaBmqbuwa6Wbi+9thLb6E8wxneVsDmdVlBcVgAovSe8Bpre+I6AntV3jm+Q/uIjd3yhNQ==
"@rabby-wallet/[email protected].8":
version "1.3.8"
resolved "https://registry.yarnpkg.com/@rabby-wallet/gnosis-sdk/-/gnosis-sdk-1.3.8.tgz#44767a08244f3ddef579b307d04abc7b1ab020fb"
integrity sha512-kcSvMrckWi40lOvWXQ0K+fy3TIbPpST8+MeGZno53JllHmtSkwtL33yx7Lt6JY0l/W76AfUDOzE+nZpOY8F8aA==
dependencies:
"@ethersproject/bignumber" "^5.5.0"
"@ethersproject/bytes" "^5.5.0"
Expand Down Expand Up @@ -4738,10 +4738,10 @@
sinon-chrome "^3.0.1"
webextension-polyfill "0.7.0"

"@rabby-wallet/rabby-api@^0.7.24-alpha.3":
version "0.7.24-alpha.3"
resolved "https://registry.yarnpkg.com/@rabby-wallet/rabby-api/-/rabby-api-0.7.24-alpha.3.tgz#18b2096ecb6112fe7812646a3b14a37da2942cd9"
integrity sha512-P2H9qw6EOiFgkU7O34ZDLK8YJGvBuNorG5JuhWvQe74+lLIRI7oUVjMbDPz3Vc5n2dfzY4TT4ypzrAFRmW1GPA==
"@rabby-wallet/[email protected]":
version "0.7.24"
resolved "https://registry.yarnpkg.com/@rabby-wallet/rabby-api/-/rabby-api-0.7.24.tgz#da6a16ecf164b1eefad8b3b7ed7f38b6ce204cab"
integrity sha512-AWm0P+z1S1QGThjmrDJMdjXICEGNIxUM+cbgms2jQ9u/V4sTgtUBv6SPumG2FNwJNnlMLwoJvl2s77zqxgGPcw==
dependencies:
"@rabby-wallet/rabby-sign" "^0.3.3"
axios "^0.27.2"
Expand Down

0 comments on commit a39380c

Please sign in to comment.