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

chore(jumpstart): support for reclaim from retired jumpstart contracts #5200

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

kathaypacific
Copy link
Collaborator

Description

This PR adds a retiredContractAddresses to the jumpstart dynamic config.

If we need to change the contract for whatever reason, we should still allow users to reclaim their funds that were sent to previous versions of the contract. The only place we need to do this is in the transaction classification stage - we should mark transactions to any jumpstart contract appropriately, from there the jumpstart transaction details screen will allow reclaim from that contract directly.

Of course this logic relies on the abi of the jumpstart contracts staying the same, since a single abi is baked into the app.

Test plan

Unit tests

Related issues

n/a

Backwards compatibility

Y

Network scalability

Y

Copy link

emerge-tools bot commented Apr 2, 2024

1 build had no size change

Name Version Download Change Install Change Approval
Celo (test)
org.celo.mobile.test
1.81.0 (146) 24.4 MB ⬆️ 1.2 kB 60.9 MB - N/A

Celo (test) 1.81.0 (146)
org.celo.mobile.test

No changes to report


🛸 Powered by Emerge Tools

Copy link

codecov bot commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.78%. Comparing base (3315e1e) to head (0be5df8).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5200   +/-   ##
=======================================
  Coverage   85.78%   85.78%           
=======================================
  Files         744      744           
  Lines       30345    30348    +3     
  Branches     5238     5238           
=======================================
+ Hits        26030    26033    +3     
  Misses       4076     4076           
  Partials      239      239           
Files Coverage Δ
src/statsig/constants.ts 100.00% <ø> (ø)
src/transactions/feed/TransferFeedItem.tsx 88.46% <100.00%> (+0.70%) ⬆️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3315e1e...0be5df8. Read the comment docs.

Copy link
Member

@jeanregisser jeanregisser left a comment

Choose a reason for hiding this comment

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

Great! 👍

const jumpstartAddresses = [
jumpstartConfig?.contractAddress,
...(jumpstartConfig?.retiredContractAddresses ?? []),
].filter((address): address is string => !!address)
Copy link
Member

Choose a reason for hiding this comment

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

nit: we have a helper for this.

Suggested change
].filter((address): address is string => !!address)
].filter(isPresent)

@kathaypacific kathaypacific added this pull request to the merge queue Apr 3, 2024
Merged via the queue into main with commit 6cb5702 Apr 3, 2024
17 checks passed
@kathaypacific kathaypacific deleted the kathy/jumpstart-multiple-contracts branch April 3, 2024 12:46
shottah pushed a commit to zed-io/kolektivo that referenced this pull request May 15, 2024
valora-inc#5200)

### Description

This PR adds a `retiredContractAddresses` to the jumpstart dynamic
config.

If we need to change the contract for whatever reason, we should still
allow users to reclaim their funds that were sent to previous versions
of the contract. The only place we need to do this is in the transaction
classification stage - we should mark transactions to _any_ jumpstart
contract appropriately, from there the jumpstart transaction details
screen will allow reclaim from that contract directly.

Of course this logic relies on the abi of the jumpstart contracts
staying the same, since a single abi is baked into the app.

### Test plan

Unit tests

### Related issues

n/a

### Backwards compatibility

Y

### Network scalability

Y
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