MOB-193 PR
This commit is contained in:
parent
614f92def8
commit
54d5b9fc1d
@ -42,7 +42,7 @@
|
||||
"@cosmjs/tendermint-rpc": "^0.32.1",
|
||||
"@dydxprotocol/v4-abacus": "^1.4.6",
|
||||
"@dydxprotocol/v4-client-js": "^1.0.20",
|
||||
"@dydxprotocol/v4-localization": "^1.1.31",
|
||||
"@dydxprotocol/v4-localization": "^1.1.34",
|
||||
"@ethersproject/providers": "^5.7.2",
|
||||
"@js-joda/core": "^5.5.3",
|
||||
"@radix-ui/react-accordion": "^1.1.2",
|
||||
|
||||
16
pnpm-lock.yaml
generated
16
pnpm-lock.yaml
generated
@ -1,5 +1,9 @@
|
||||
lockfileVersion: '6.0'
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
overrides:
|
||||
follow-redirects: 1.15.3
|
||||
|
||||
@ -32,8 +36,8 @@ dependencies:
|
||||
specifier: ^1.0.20
|
||||
version: 1.0.20
|
||||
'@dydxprotocol/v4-localization':
|
||||
specifier: ^1.1.31
|
||||
version: 1.1.31
|
||||
specifier: ^1.1.34
|
||||
version: 1.1.34
|
||||
'@ethersproject/providers':
|
||||
specifier: ^5.7.2
|
||||
version: 5.7.2
|
||||
@ -1319,8 +1323,8 @@ packages:
|
||||
- utf-8-validate
|
||||
dev: false
|
||||
|
||||
/@dydxprotocol/v4-localization@1.1.31:
|
||||
resolution: {integrity: sha512-plJVIgFAKq9/hA/gk5GgKgCQFsH3pNtDWfG/yHLDXyiGX0M0mMEi1bTNVs4podFVoHJu1nSL9YPFlpJ00FteGw==}
|
||||
/@dydxprotocol/v4-localization@1.1.34:
|
||||
resolution: {integrity: sha512-I7zivjv8gS+6b9n7/wh7PY9QEUDIIyLx9ugZ5K6ybar0xT/06yupOVdVE6iLivQ/IAsVi/RFHkD8bQd0DWCetg==}
|
||||
dev: false
|
||||
|
||||
/@dydxprotocol/v4-proto@4.0.0-dev.0:
|
||||
@ -16049,7 +16053,3 @@ packages:
|
||||
/zwitch@2.0.4:
|
||||
resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==}
|
||||
dev: true
|
||||
|
||||
settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
@ -24,12 +24,18 @@ type ElementProps = {
|
||||
// for testing only
|
||||
// export const mobileAppUrl = "http://example.com";
|
||||
|
||||
// for testing to verify <meta> is retrieved by name, QR code should show "@dYdX" as value
|
||||
// export const mobileAppUrl = document.querySelector('meta[name="twitter:creator"]')?.getAttribute('content')
|
||||
let mobileAppUrl: string | undefined | null = undefined;
|
||||
|
||||
export const mobileAppUrl =
|
||||
document.querySelector('meta[name="smartbanner:button-url-apple"]')?.getAttribute('content') ??
|
||||
document.querySelector('meta[name="smartbanner:button-url-google"]')?.getAttribute('content');
|
||||
export const getMobileAppUrl = () => {
|
||||
if (!mobileAppUrl) {
|
||||
mobileAppUrl =
|
||||
// for testing to verify <meta> is retrieved by name, QR code should show "@dYdX" as value
|
||||
// document.querySelector('meta[name="twitter:creator"]')?.getAttribute('content') ??
|
||||
document.querySelector('meta[name="smartbanner:button-url-apple"]')?.getAttribute('content') ??
|
||||
document.querySelector('meta[name="smartbanner:button-url-google"]')?.getAttribute('content');
|
||||
}
|
||||
return mobileAppUrl;
|
||||
}
|
||||
|
||||
const MobileQrCode = ({
|
||||
url,
|
||||
|
||||
@ -40,7 +40,7 @@ import { getAppTheme } from '@/state/configsSelectors';
|
||||
import { isTruthy } from '@/lib/isTruthy';
|
||||
import { truncateAddress } from '@/lib/wallet';
|
||||
import { MustBigNumber } from '@/lib/numbers';
|
||||
import { mobileAppUrl } from '../dialogs/MobileDownloadDialog';
|
||||
import { getMobileAppUrl } from '../dialogs/MobileDownloadDialog';
|
||||
|
||||
export const AccountMenu = () => {
|
||||
const stringGetter = useStringGetter();
|
||||
@ -190,7 +190,7 @@ export const AccountMenu = () => {
|
||||
label: stringGetter({ key: STRING_KEYS.DISPLAY_SETTINGS }),
|
||||
onSelect: () => dispatch(openDialog({ type: DialogTypes.DisplaySettings })),
|
||||
},
|
||||
...(mobileAppUrl
|
||||
...(getMobileAppUrl()
|
||||
? [
|
||||
{
|
||||
value: 'MobileDownload',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user