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

Dapp Browser + provider #5543

Merged
merged 9 commits into from
Mar 21, 2024
Merged

Dapp Browser + provider #5543

merged 9 commits into from
Mar 21, 2024

Conversation

brunobar79
Copy link
Member

Fixes APP-####

What changed (plus any additional context for devs)

Screen recordings / screenshots

https://recordit.co/TRKYEIOouD

What to test

Copy link

socket-security bot commented Mar 21, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] environment, filesystem, unsafe Transitive: shell +13 547 kB evilebottnawi

🚮 Removed packages: npm/@rainbow-me/[email protected]

View full report↗︎

};

const checkRateLimitFn = async (host: string) => {
// try {
Copy link
Member Author

Choose a reason for hiding this comment

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

I'll hook this up later

const numericChainId = convertHexToString(chainId);
const supportedChainId = supportedChains.includes(numericChainId);
alert('Chain Id not supported');
console.warn('PROVIDER TODO: TODO SEND NOTIFICATION');
Copy link
Member Author

Choose a reason for hiding this comment

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

left this so we can add some toast later on

appSessionsStore.getState().updateActiveSessionNetwork({ host: host, network: getNetworkFromChainId(Number(numericChainId)) });
messenger.send(`chainChanged:${host}`, Number(numericChainId));
}
console.warn('PROVIDER TODO: TODO SEND NOTIFICATION');
Copy link
Member Author

Choose a reason for hiding this comment

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

left this so we can add some toast later on

Copy link
Contributor

@skylarbarrera skylarbarrera left a comment

Choose a reason for hiding this comment

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

lets get it lets go

return response;
};

const isSupportedChainId = (chainId: number) => RainbowNetworks.filter(network => Number(network.id) === chainId).length > 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

i feel like this should be

const isSupportedChainId = (chainId: number) => !!RainbowNetworks.find(network => Number(network.id) === chainId);

Copy link
Member Author

Choose a reason for hiding this comment

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

I feel like there shouldn't be networks at all but ok

Copy link
Contributor

Choose a reason for hiding this comment

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

insert spiderman meme

@@ -24,9 +24,9 @@ export type RequestType = 'walletconnect' | 'browser';
// Dapp Browser

export interface DappConnectionData {
dappName: string;
dappName?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

curious when this would be undefined

Copy link
Contributor

Choose a reason for hiding this comment

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

prob ts tbh

Copy link
Member Author

Choose a reason for hiding this comment

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

a website without <title> tag

src/utils/requestNavigationHandlers.ts Outdated Show resolved Hide resolved
@brunobar79 brunobar79 merged commit f678d8f into develop Mar 21, 2024
6 checks passed
@brunobar79 brunobar79 deleted the @bruno/provider branch March 21, 2024 23:50
BrodyHughes added a commit that referenced this pull request Apr 2, 2024
* 'develop' of github.com:rainbow-me/rainbow:
  Bump Rudderstack version to v1.12.1 (#5556)
  txs: detail sheet updates (#5535)
  browser: requests background color (#5562)
  fix: hide favs on non mainnet assets (#5565)
  balances: fetch twice tx confirm (#5551)
  [CHORE]: Remove Apollo client in favor of `@/graphql` (#5555)
  browser: favorites state + menu (#5553)
  init browser state (#5552)
  Dapp Browser: Search UI (#5542)
  Dapp Browser + provider (#5543)
  NFT offers/mints gas estimation improvements (#5448)
  State dump modifications (#5382)
  fix crash (#5544)
  [SWAPS V2]: Adjust asset types + utils to match BX (#5538)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants