-
Notifications
You must be signed in to change notification settings - Fork 635
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
Remove WC v1 #6214
Remove WC v1 #6214
Conversation
381eb59
to
7d0f658
Compare
@@ -5,7 +5,6 @@ import { AppRegistry, Dimensions, LogBox, StyleSheet, View } from 'react-native' | |||
import { Toaster } from 'sonner-native'; | |||
import { MobileWalletProtocolProvider } from '@coinbase/mobile-wallet-protocol-host'; | |||
import { DeeplinkHandler } from '@/components/DeeplinkHandler'; | |||
import { AppStateChangeHandler } from '@/components/AppStateChangeHandler'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing AppStateChangeHandler
as it was being used only for WC v1 subscription when coming back from background
|
||
const handleAppStateChange = useCallback( | ||
(nextAppState: AppStateStatus) => { | ||
if (appState === 'background' && nextAppState === 'active') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no longer needed as this was for loading WC v1 when coming back from background app state
import rainbowIconCircle from '@/assets/rainbow-icon-circle.png'; | ||
import { Source } from 'react-native-fast-image'; | ||
|
||
function ConnectedDapps() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this component was unused; was replaced with ConnectedDappsSheet
a while ago
|
||
const renderItem = ({ item }) => <WalletConnectListItem {...item} />; | ||
|
||
export default function WalletConnectList({ onLayout, ...props }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused component
|
||
const columnStyle = padding.object(0, 10, 0, 12); | ||
|
||
export default function WalletConnectListItem({ account, chainId, dappIcon, dappName, dappUrl }) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was used for the V1 flow in ConnectedDappsSheet
which is no longer needed
7d0f658
to
15e58db
Compare
import { removeRequest } from '../redux/requests'; | ||
import { walletConnectSendStatus } from '../redux/walletconnect'; | ||
|
||
export default function useTransactionConfirmation() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was an unused hook
[requestId: number]: WalletconnectRequestData; | ||
} | ||
|
||
export interface WalletConnectRequestsState { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new store that replaces redux/requests
and exposes the same methods for adding a request, removing a request, and getting a sorted list of the WC requests to display
@@ -752,21 +752,9 @@ export async function onSessionRequest(event: SignClientTypes.EventArguments['se | |||
}, | |||
}; | |||
|
|||
const { requests: pendingRequests } = store.getState().requests; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the WC v2 flow, we used to directly update the redux/requests
redux state as well as localstorage - now we use the new requests store
/** | ||
* Display details loaded for a request. | ||
*/ | ||
interface RequestDisplayDetails { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved some of the types from the redux/requests
and redux/walletconnect
over to this file instead
const topic = remoteMessage?.data?.topic; | ||
|
||
setTimeout(() => { | ||
const requests = dispatch(requestsForTopic(topic as string)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why it ended up like this, but this function doesn't really do anything other than fetch requests
15e58db
to
7ffa4e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good on both OS's and also did a sanity check on dapp browser to make sure we're good. QA Passed 👍🏽
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't test but the code is good 🫶
2ea0f15
to
28b0e37
Compare
Fixes APP-1585
What changed (plus any additional context for devs)
Screen recordings / screenshots
RPReplay_Final1729624897.MP4
What to test