Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: integrate with divvy protocol #6492

Merged
merged 34 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
de4243d
chore: add redux params
kathaypacific Feb 6, 2025
0c90d29
fix: type
kathaypacific Feb 11, 2025
dcbf216
fix: knip
kathaypacific Feb 11, 2025
58c1886
fix: ensure transaction sagas can handle registration transactions
kathaypacific Feb 12, 2025
cbbc09a
feat: integrate with divvy protocol
kathaypacific Feb 12, 2025
d3984dd
chore: rename registrations variable
kathaypacific Feb 12, 2025
1b50b25
fix: type safe protocol ids
kathaypacific Feb 12, 2025
7c13a3c
Merge branch 'kathy/fl-integration-1' into kathy/fl-integration-2
kathaypacific Feb 12, 2025
883b938
fix: add try catch
kathaypacific Feb 12, 2025
bb9564e
fix: root schema
kathaypacific Feb 12, 2025
b887a35
Merge branch 'kathy/fl-integration-1' into kathy/fl-integration-2
kathaypacific Feb 12, 2025
eb22bcd
Merge branch 'kathy/fl-integration-2' into kathy/fl-integration-3
kathaypacific Feb 12, 2025
47e2a1d
fix: rename
kathaypacific Feb 12, 2025
ae376ff
fix: lint
kathaypacific Feb 12, 2025
e1627e9
chore: add first tests
kathaypacific Feb 12, 2025
87e2ff0
Merge branch 'main' into kathy/fl-integration-2
kathaypacific Feb 12, 2025
0761450
chore: add extra test
kathaypacific Feb 12, 2025
dd13d96
Merge branch 'kathy/fl-integration-2' into kathy/fl-integration-3
kathaypacific Feb 12, 2025
41707f0
chore: add more tests
kathaypacific Feb 12, 2025
e8c969e
fix: nonce
kathaypacific Feb 12, 2025
c7663f4
fix: test title
kathaypacific Feb 12, 2025
77397ce
chore: add test
kathaypacific Feb 12, 2025
80f271b
chore: test
kathaypacific Feb 12, 2025
9fa65f9
fix: comments
kathaypacific Feb 12, 2025
56ae601
Merge branch 'main' into kathy/fl-integration-3
kathaypacific Feb 12, 2025
b26e9e6
chore: spawn tx watcher
kathaypacific Feb 12, 2025
9ff81a3
refactor: single referral tx
kathaypacific Feb 17, 2025
da27367
Merge branch 'main' into kathy/fl-integration-3
kathaypacific Feb 18, 2025
655c798
fix: make it work with only one transaction
kathaypacific Feb 18, 2025
d8de889
fix: some tests
kathaypacific Feb 18, 2025
22996d6
fix: more tests
kathaypacific Feb 18, 2025
15ddd07
fix: tests
kathaypacific Feb 18, 2025
29ffa92
chore: update contract address
kathaypacific Feb 19, 2025
36215b0
chore: add one more test
kathaypacific Feb 19, 2025
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
6 changes: 3 additions & 3 deletions src/app/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ interface ToggleHideBalances {
interface DivviRegistrationCompleted {
type: Actions.DIVVI_REGISTRATION_COMPLETED
networkId: NetworkId
protocolId: SupportedProtocolId
protocolIds: SupportedProtocolId[]
}

export type ActionTypes =
Expand Down Expand Up @@ -341,11 +341,11 @@ export const toggleHideBalances = (): ToggleHideBalances => {

export const divviRegistrationCompleted = (
networkId: NetworkId,
protocolId: SupportedProtocolId
protocolIds: SupportedProtocolId[]
): DivviRegistrationCompleted => {
return {
type: Actions.DIVVI_REGISTRATION_COMPLETED,
networkId,
protocolId,
protocolIds,
}
}
2 changes: 1 addition & 1 deletion src/app/reducers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export const appReducer = (
...state.divviRegistrations,
[action.networkId]: [
...(state.divviRegistrations[action.networkId] ?? []),
action.protocolId,
...action.protocolIds,
],
},
}
Expand Down
2 changes: 2 additions & 0 deletions src/app/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@ export const showNotificationSpotlightSelector = (state: RootState) =>
export const hideWalletBalancesSelector = (state: RootState) => state.app.hideBalances

export const pendingDeepLinkSelector = (state: RootState) => state.app.pendingDeepLinks[0] ?? null

export const divviRegistrationsSelector = (state: RootState) => state.app.divviRegistrations
4 changes: 4 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { LoggerLevel } from 'src/utils/LoggerLevels'
// eslint-disable-next-line import/no-relative-packages
import { TORUS_SAPPHIRE_NETWORK } from '@toruslabs/constants'
import { LaunchArguments } from 'react-native-launch-arguments'
import { SupportedProtocolId } from 'src/divviProtocol/constants'
import { HomeActionName } from 'src/home/types'
import { ToggleableOnboardingFeatures } from 'src/onboarding/types'
import { stringToBoolean } from 'src/utils/parsing'
Expand Down Expand Up @@ -226,3 +227,6 @@ export const ENABLED_QUICK_ACTIONS = (
export const FETCH_FIATCONNECT_QUOTES = true

export const WALLETCONNECT_UNIVERSAL_LINK = 'https://valoraapp.com/wc'

export const DIVVI_PROTOCOL_IDS: SupportedProtocolId[] = []
export const DIVVI_REFERRER_ID: string | undefined = undefined
Loading
Loading