diff --git a/package.json b/package.json index a70c186..b13e1fa 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "@material-ui/lab": "^4.0.0-alpha.58", "@project-serum/anchor": "^0.7.0", "@project-serum/serum": "^0.13.33", - "@project-serum/swap-ui": "^0.1.5", + "@project-serum/swap-ui": "^0.1.6", "@solana/spl-token-registry": "^0.2.102", "@solana/web3.js": "^1.10.1", "@testing-library/jest-dom": "^5.11.6", diff --git a/src/components/SwapButton.js b/src/components/SwapButton.js index 3c41180..bad3a91 100644 --- a/src/components/SwapButton.js +++ b/src/components/SwapButton.js @@ -16,11 +16,12 @@ import { useTokenInfos } from '../utils/tokens/names'; import { useSendTransaction } from '../utils/notifications'; import { useWallet } from '../utils/wallet'; import { useConnection } from '../utils/connection'; -import { isExtension } from '../utils/utils'; +import { useIsExtensionWidth } from '../utils/utils'; import DialogForm from './DialogForm'; export default function SwapButton({ size }) { - if (isExtension) { + const isExtensionWidth = useIsExtensionWidth(); + if (isExtensionWidth) { return ; } else { return ; diff --git a/yarn.lock b/yarn.lock index 31e9e95..057ab00 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1938,10 +1938,10 @@ bn.js "^5.1.2" buffer-layout "^1.2.0" -"@project-serum/swap-ui@^0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@project-serum/swap-ui/-/swap-ui-0.1.5.tgz#ec15d52781a34eca346103fc7a4ffd39070caf2c" - integrity sha512-K0ujOrglu+m2bjV9VZF4vl9+LVY1+PEUE7S7DPMUZJvcg1UtmcA9ecsaHqJcbuh3eLfQOXST75PBbX1V1ca3Tw== +"@project-serum/swap-ui@^0.1.6": + version "0.1.6" + resolved "https://registry.yarnpkg.com/@project-serum/swap-ui/-/swap-ui-0.1.6.tgz#745f6d7a287a2e662416689f9a4b417bf62406d6" + integrity sha512-ltCNk/CBFBwTq1LB9IifKIAmKSP6JKQXy19+VZymhGhd2gn5rphW7UNE8k3PoIn3X7ZGuiHiK4B/6c6qnh7pQw== dependencies: "@fontsource/roboto" "^4.3.0" "@project-serum/serum" "^0.13.34"