Skip to content

Commit

Permalink
Merge branch 'main' into lochie/metamask-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
lochie committed Jun 20, 2024
2 parents d95d44c + 3db9c75 commit 4017d92
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 3 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# 1.8.2

This update includes improvements to the `CoinbaseWalletSDK` connect popup and `MockConnector`.

## Fixed

- `CoinbaseWalletSDK` connect popup now works on first interaction.
- `MockConnector` now working as intended.

# 1.8.1

This update adds additional localisations, and improves the stability of Coinbase Wallet and MetaMask connections.
Expand Down
2 changes: 1 addition & 1 deletion packages/connectkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "connectkit",
"version": "1.8.1",
"version": "1.8.2",
"author": "Family",
"homepage": "https://docs.family.co/connectkit",
"license": "BSD-2-Clause license",
Expand Down
53 changes: 53 additions & 0 deletions packages/connectkit/src/assets/logos.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,57 @@
import { isFamily, isRainbow, isZerion } from '../utils/wallets';

export const Mock = ({ ...props }) => (
<svg
{...props}
aria-hidden="true"
width="44"
height="44"
viewBox="0 0 44 44"
fill="none"
xmlns="http://www.w3.org/2000/svg"
style={{
background: 'linear-gradient(180deg, #8995A9 0%, #424D5F 99.48%)',
}}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M20.5611 8.12948C21.0082 7.90729 21.5007 7.79167 22 7.79167C22.4993 7.79167 22.9919 7.90729 23.439 8.12948L23.4408 8.1304L33.0387 12.9293C33.577 13.197 34.031 13.61 34.3478 14.121C34.6649 14.6323 34.833 15.2218 34.8333 15.8234V27.2595C34.833 27.8611 34.6649 28.4511 34.3478 28.9624C34.031 29.4733 33.578 29.8858 33.0398 30.1535L23.4411 34.9528C22.9919 35.1775 22.4963 35.2947 21.994 35.2947C21.4918 35.2947 20.9964 35.1777 20.5472 34.9529L10.9475 30.1531L10.9452 30.1519C10.4071 29.8808 9.95535 29.4646 9.6411 28.9504C9.32739 28.437 9.16312 27.8464 9.16673 27.2448L9.16675 27.2417L10.0004 27.2475H9.16673V27.2448V15.8239C9.16705 15.2223 9.33518 14.6322 9.65222 14.121C9.96906 13.61 10.4221 13.1976 10.9604 12.9298L20.5592 8.1304L20.5611 8.12948ZM21.3031 9.62267L11.8706 14.3389L22 19.4036L32.1294 14.3389L22.697 9.62267C22.4806 9.51531 22.2416 9.45905 22 9.45905C21.7585 9.45905 21.5194 9.51534 21.3031 9.62267ZM10.8341 15.8241C10.8341 15.7785 10.8362 15.733 10.8401 15.6878L21.1663 20.8509V33.3983L11.6955 28.6629C11.4352 28.5315 11.2159 28.3297 11.0638 28.0809C10.9116 27.8318 10.8321 27.5452 10.8341 27.2533L10.8341 27.2475V15.8241ZM22.8337 33.3923L32.2967 28.6608C32.5576 28.5312 32.7772 28.3313 32.9308 28.0836C33.0844 27.836 33.1658 27.5504 33.166 27.259V15.8243C33.1659 15.7786 33.1639 15.7331 33.1599 15.6878L22.8337 20.8509V33.3923Z"
fill="url(#paint0_linear_3546_7073)"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M10.8341 15.8241C10.8341 15.7785 10.8362 15.733 10.8401 15.6878L21.1663 20.8509V33.3983L11.6955 28.6629C11.4352 28.5315 11.2159 28.3297 11.0638 28.0809C10.9116 27.8318 10.8321 27.5452 10.8341 27.2533L10.8341 27.2475V15.8241Z"
fill="url(#paint1_linear_3546_7073)"
fillOpacity="0.3"
/>
<defs>
<linearGradient
id="paint0_linear_3546_7073"
x1="22"
y1="7.79167"
x2="22"
y2="35.2947"
gradientUnits="userSpaceOnUse"
>
<stop stopColor="white" />
<stop offset="1" stopColor="white" stopOpacity="0.7" />
</linearGradient>
<linearGradient
id="paint1_linear_3546_7073"
x1="22"
y1="7.79167"
x2="22"
y2="35.2947"
gradientUnits="userSpaceOnUse"
>
<stop stopColor="white" />
<stop offset="1" stopColor="white" stopOpacity="0.7" />
</linearGradient>
</defs>
</svg>
);
export const Injected = ({ ...props }) => (
<svg
{...props}
Expand Down Expand Up @@ -1270,6 +1322,7 @@ const Fordefi = ({ ...props }) => (
);

export default {
Mock,
Injected,
OtherWallets,
WalletConnect,
Expand Down
2 changes: 1 addition & 1 deletion packages/connectkit/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const CONNECTKIT_VERSION = '1.8.1';
export const CONNECTKIT_VERSION = '1.8.2';

export * as Types from './types';
export { default as getDefaultConfig } from './defaultConfig';
Expand Down
3 changes: 2 additions & 1 deletion packages/connectkit/src/wallets/useWallets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const useWallets = (): WalletProps[] => {
connector,
iconShape: 'squircle',
isInstalled:
connector.type === 'mock' ||
connector.type === 'injected' ||
// TODO: convert this to a flag in the configs
isCoinbaseWalletConnector(connector.id) || // always run coinbase wallet SDK ||
Expand Down Expand Up @@ -106,7 +107,7 @@ export const useWallets = (): WalletProps[] => {
.filter(
(wallet, index, self) =>
!(
wallet.id === 'metaMaskSDK' &&
(wallet.id === 'metaMaskSDK' || wallet.id === 'metaMask') &&
self.find(
(w) => w.id === 'io.metamask' || w.id === 'io.metamask.mobile'
)
Expand Down
3 changes: 3 additions & 0 deletions packages/connectkit/src/wallets/walletConfigs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export type WalletConfigProps = {
export const walletConfigs: {
[rdns: string]: WalletConfigProps; // for multiple cases seperate rdns by comma
} = {
mock: {
icon: <Logos.Mock />,
},
argent: {
name: 'Argent',
icon: <Logos.Argent />,
Expand Down

0 comments on commit 4017d92

Please sign in to comment.