Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions packages/react-wallet/example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3011,14 +3011,10 @@
version "0.0.0"
uid ""

"@sovryn/wallet@link:../../wallet/dist":
version "0.0.0"
uid ""

"@sovryn/wallet@~2.2.15":
version "2.2.15"
resolved "https://registry.yarnpkg.com/@sovryn/wallet/-/wallet-2.2.15.tgz#1fbf721c820081b5f6c457a877761174360ccf47"
integrity sha512-waatev/5BGi1+OICUN7Q5aLZxaHZcZmOBqSFdHRca19uZ313FG7ow0SFi7Ti/+wywvQHNBPX1//PmMLLk2Jf8g==
"@sovryn/wallet@^2.2.5":
version "2.2.18"
resolved "https://registry.yarnpkg.com/@sovryn/wallet/-/wallet-2.2.18.tgz#c8d6e5db3665b8c9682a545e719aa54471e4c112"
integrity sha512-sOXYeHCprTSxAKKCOyl+tvxA14IDACQJ/aUIrUW77YF0EZB7zHFXTLdXHAXBKYf6brUCwLV0CtKlHm7dN5oA8Q==
dependencies:
"@ethereumjs/common" "^2.6.4"
"@ethereumjs/tx" "^3.5.2"
Expand All @@ -3032,7 +3028,6 @@
"@sovryn/common" "^2.1.1"
"@trezor/rollout" "^1.0.7"
"@types/w3c-web-usb" "^1.0.5"
"@walletconnect/web3-provider" "^1.8.0"
ethereumjs-common "1.5.2"
ethereumjs-tx "2.1.2"
ethereumjs-util "7.0.3"
Expand All @@ -3042,6 +3037,10 @@
web3 "^1.3.4"
web3-utils "^1.3.4"

"@sovryn/wallet@link:../../wallet/dist":
version "0.0.0"
uid ""

"@svgr/babel-plugin-add-jsx-attribute@^4.2.0":
version "4.2.0"
resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-4.2.0.tgz#dadcb6218503532d6884b210e7f3c502caaa44b1"
Expand Down Expand Up @@ -3680,7 +3679,7 @@
js-sha3 "0.8.0"
query-string "6.13.5"

"@walletconnect/web3-provider@^1.8.0":
"@walletconnect/web3-provider@^1.5.2":
version "1.8.0"
resolved "https://registry.yarnpkg.com/@walletconnect/web3-provider/-/web3-provider-1.8.0.tgz#e90d903f4c609b7158ecb5f0f41df121e93b56b5"
integrity sha512-lqqEO0oRmCehH+c8ZPk3iH7I7YtbzmkWd58/Or2AgWAl869JamzndKCD3sTlNsPRQLxxPpraHQqzur7uclLWvg==
Expand Down
3 changes: 1 addition & 2 deletions packages/react-wallet/src/components/Item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,10 @@ export function WalletItem(props: WalletItemProps) {
return (
<ItemLink
options={props.options}
image={props.image}
title={props.title}
small={props.small}
href={walletItemHref()}
dataAttribute={props.dataAttribute}
{...props}
/>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import { images } from '../../../assets/images';
import { PORTIS_SUPPORTED_CHAINS } from '../../../contants';
import { translations } from '../../../locales/i18n';
import { BottomLinkContainer } from '../../BottomLinkContainer';
import { Item, ItemLink } from '../../Item';
import { Item, ItemLink, WalletItem } from '../../Item';
import { ItemList } from '../../ItemList';

interface Props {
onWalletSelected: (value: ProviderType) => void;
hideInstructionLink?: boolean;
uri?: string;
}

const wallet = detectInjectableWallet();
Expand Down Expand Up @@ -67,6 +68,21 @@ export function BrowserWalletSelector(props: Props) {
dataAttribute='browserType-nifty'
/>
)}

{wallet === 'defiant' && (
<WalletItem
options={options}
image={images.defiantWallet}
title='defiant'
ios={`defiantapp://wc?uri=${props.uri}`}
android={props.uri}
linkHref='https://defiantapp.tech/'
linkTitle={t(translations.dialogs.browserSelector.download)}
universal='https://defiantapp.tech/'
dataAttribute='mobileWallet-defiant'
/>
)}

{(['metamask', 'unknown'].includes(wallet) ||
(signTypedRequired && wallet === 'liquality')) && (
<Item
Expand Down Expand Up @@ -114,6 +130,7 @@ function detectInjectableWallet() {
if (ethereum.isLiquality) return 'liquality';
if (ethereum.isNiftyWallet) return 'nifty';
if (ethereum.isMetaMask) return 'metamask';
if (ethereum.isDefiant) return 'defiant';
return 'unknown';
}
return 'none';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export const WalletConnectionView: React.FC<WalletConnectionViewProps> = props =
{state.step === WalletConnectionStep.BROWSER_PROVIDERS && (
<BrowserWalletSelector
onWalletSelected={onProviderChosen}
uri={context.uri}
hideInstructionLink={props.hideInstructionLink}
/>
)}
Expand Down
Loading