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

Crypto-to-fiat: Payments to liquidation address should show relevant member #2892

Conversation

jakubcolony
Copy link
Collaborator

@jakubcolony jakubcolony commented Aug 6, 2024

Description

This PR fixes a number of issues around displaying the relevant user whose liquidation address a payment was made to.

When payment is made to the liquidation address, it should be swapped with relevant user in the following places:

  • Simple payment action (action description, recipient field)
  • Advanced payment action (recipients in the table)
  • Activity feed action descriptions

Testing

Unless you're testing against Bridge production, there's no way to test this properly as the sandbox generated addresses are not valid ETH addresses.

For that reason, we'll create a liquidation address in the DB manually. In production, this will be done by the checkKyc handler whenever it finds that a user doesn't have an address linked to their bank account already.

mutation CreateLiqAdd {
  createLiquidationAddress(
    input: {
      chainId: 265669100,
      userAddress: "0xb77D57F4959eAfA0339424b83FcFaf9c15407461", # Change if not using Dev Wallet 1
      liquidationAddress: "0x87bDe603bF318B2eb2C88B161CA5c1718e712137" # Use any address you want
    }
  ) {
    id
  }
}

Make simple and advanced payments to the created liquidation address. In each of the places listed above, it should be replaced with your user's details.

Screen.Recording.2024-08-08.at.09.23.31.mov
Screen.Recording.2024-08-08.at.09.25.00.mov

Note: The recipient field's user popover will show the address twice instead of the username, it's an existing issue tracked by #2891.

Resolves #2733

@jakubcolony jakubcolony self-assigned this Aug 6, 2024
@jakubcolony jakubcolony changed the base branch from master to feat/2793-liquidation-address August 6, 2024 22:56
createLiquidationAddress,
{
input: {
chainId: 42161,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will be made into an env variable once they're set up in lambdas

@jakubcolony jakubcolony marked this pull request as ready for review August 8, 2024 07:43
@jakubcolony jakubcolony requested review from a team as code owners August 8, 2024 07:43
Copy link
Member

@rdig rdig left a comment

Choose a reason for hiding this comment

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

Working as expected. Nicely done.

I just created the liquidation address

Screenshot from 2024-08-08 17-56-03

Then I created a payment. While it was "pending", the address still was displayed as the one I've manually pasted in, but once the action was completed, it got replaced by the user profile

Screenshot from 2024-08-08 18-00-16
Screenshot from 2024-08-08 18-00-24
Screenshot from 2024-08-08 18-00-30

Copy link
Contributor

@rumzledz rumzledz left a comment

Choose a reason for hiding this comment

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

Great stuff @jakubcolony ! I connected Dev Wallet 1 and it correctly detects that it's Leela's liquidation address ✨

Simple Payment
2753_sp

Advanced Payment
2753_ap

Copy link
Contributor

@bassgeta bassgeta left a comment

Choose a reason for hiding this comment

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

Nicely done, I created a payment action to the liquidation address and then it loaded into leela.
image

🚢

@jakubcolony jakubcolony merged commit c36a424 into feat/2793-liquidation-address Aug 13, 2024
3 of 5 checks passed
@jakubcolony jakubcolony deleted the fix/2733-liquidation-address-recipient branch August 13, 2024 06:31
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.

Payments to member's liquidation address should show relevant member
4 participants