Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: integrated with get-starknet-wallet #163

Merged
merged 6 commits into from
Apr 25, 2022
Merged

feat: integrated with get-starknet-wallet #163

merged 6 commits into from
Apr 25, 2022

Conversation

avimak
Copy link

@avimak avimak commented Apr 18, 2022

Description of the Changes

Enhancement:
I've created a new library that is compatible with the current getStarknet() API but is able to support more wallets on StarkNet.
This PR integrates starkgate-frontend with that lib - adding multiple StarkNet wallets support in starkgate-frontend - without changing anything but one import line, and a few icons/texts to make the connect-L2-wallet step 100% wallet-agnostic.

Checklist

  • Changes have been done against master branch, and PR does not conflict
  • New unit / functional tests have been added (whenever applicable) -> not-applicable
  • Test are passing in local environment
  • Docs have been updated -> non-required
  • PR title is follow the Conventional Commits convention: <type>[optional scope]: <description>, e.g: fix: prevent racing of requests

This change is Reviewable

@dan-ziv dan-ziv self-requested a review April 23, 2022 21:29
src/providers/WalletsProvider/WalletsProvider.js Outdated Show resolved Hide resolved
Comment on lines 41 to 42
logoPath.startsWith('data:image') ? (
<img alt={''} height={logoSize} src={logoPath} width={logoSize} />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wallet window objects provide their own icon/logo data; here we show it via <img> element

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, can you please move this logic to a renderWalletLogo function so the JSX will be more readable?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done :)

@dan-ziv dan-ziv self-requested a review April 25, 2022 09:37
@dan-ziv dan-ziv merged commit e0f996a into starknet-io:dev Apr 25, 2022
dan-ziv pushed a commit that referenced this pull request Apr 25, 2022
 ## [1.3.0-dev.1](v1.2.1-dev.5...v1.3.0-dev.1) (2022-04-25)

### 🧩 Features

* integrated with get-starknet-wallet ([#163](#163)) ([e0f996a](e0f996a))
@dan-ziv
Copy link
Collaborator

dan-ziv commented Apr 25, 2022

🎉 This PR is included in version 1.3.0-dev.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

dan-ziv pushed a commit that referenced this pull request May 2, 2022
 ## [1.2.0](v1.1.0...v1.2.0) (2022-05-02)

### 💉 Improvements

* move to hooks useConstants, useEnvs, useTranslation ([#159](#159)) ([b77ba11](b77ba11))
* useTracking ([#160](#160)) ([a8cad80](a8cad80))
* useTranslation hooks ([#162](#162)) ([92e0927](92e0927))

### 🧩 Features

* integrated with get-starknet-wallet ([#163](#163)) ([e0f996a](e0f996a))
* terms of use ([#141](#141)) ([8d9fe79](8d9fe79))
* validate starknet wallet chain ID ([#168](#168)) ([2551a7f](2551a7f))

### 🔧 Fixes

* accept button stayed disabled when browser zoom is different from 100% ([#158](#158)) ([1e4afac](1e4afac))
* add ETH mainnet addresses ([#167](#167)) ([56fa74b](56fa74b))
* app crashed when trying to connect while ArgentX wasn't installed ([55e25f7](55e25f7))
* bad overflow in modal for content with very long strings ([#161](#161)) ([36a1c6f](36a1c6f))
* calc L2 tx hash in the background ([#169](#169)) ([80d23d2](80d23d2))
* canceled transfers shown in transfer log ([#166](#166)) ([69324e8](69324e8))
* **deps:** bump gsw version ([6c01ae5](6c01ae5))
* **Faq:** question 8 ([#157](#157)) ([51da4aa](51da4aa))
* handle display of exponential balances ([44c675b](44c675b))
* isInstalled() check for gsw ([#165](#165)) ([1881192](1881192))
* unsupported chain id does not showing  ([#151](#151)) ([afa5294](afa5294))
* use getStarknet() provider on starknet contracts ([1d6b023](1d6b023))
* use wallet provider for all provider calls ([#170](#170)) ([646feee](646feee))
* **utils:** get url params returns undefined ([cde6401](cde6401))
dan-ziv pushed a commit that referenced this pull request May 2, 2022
 ## [1.3.0](v1.2.0...v1.3.0) (2022-05-02)

### 💉 Improvements

* move to hooks useConstants, useEnvs, useTranslation ([#159](#159)) ([b77ba11](b77ba11))
* useTracking ([#160](#160)) ([a8cad80](a8cad80))
* useTranslation hooks ([#162](#162)) ([92e0927](92e0927))

### 🧩 Features

* integrated with get-starknet-wallet ([#163](#163)) ([e0f996a](e0f996a))
* validate starknet wallet chain ID ([#168](#168)) ([2551a7f](2551a7f))

### 🔧 Fixes

* add ETH mainnet addresses ([#167](#167)) ([56fa74b](56fa74b))
* bad overflow in modal for content with very long strings ([#161](#161)) ([36a1c6f](36a1c6f))
* calc L2 tx hash in the background ([#169](#169)) ([80d23d2](80d23d2))
* canceled transfers shown in transfer log ([#166](#166)) ([69324e8](69324e8))
* **deps:** bump gsw version ([6c01ae5](6c01ae5))
* handle display of exponential balances ([44c675b](44c675b))
* isInstalled() check for gsw ([#165](#165)) ([1881192](1881192))
* use getStarknet() provider on starknet contracts ([1d6b023](1d6b023))
* use wallet provider for all provider calls ([#170](#170)) ([646feee](646feee))
* **utils:** get url params returns undefined ([cde6401](cde6401))
@dan-ziv
Copy link
Collaborator

dan-ziv commented May 2, 2022

🎉 This PR is included in version 1.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants