deep-ink-ventures / genesis-dao-frontend

https://genesis-dao-frontend-zeta.vercel.app
Apache License 2.0
4 stars 5 forks source link

Create delegation and revoke delegation #279

Closed deep-ink-ventures closed 11 months ago

deep-ink-ventures commented 1 year ago
  1. Change the asset page

image

Create a column called "Delegate" that will display if an account has a delegate or not. We will shortly add a delegate_address to https://service.genesis-dao.org/accounts/ - if this is null just present a - and else the addess (shortened).

For the time being it'll always be null as we are still implementing this.

Add a delegate action.

  1. If the account has no delegate and the action is called

Create a delegate screen:

image

The function to use here is delegate and it takes the assetId and the delegateAccount.

apiConnection?.tx?.assets?.delegate(assetId, delegateAccount).signAndSend ...
  1. If the account has a delegate

Revoke the delegation:

image

The function here is revokeDelegation and it again takes the assetId and the delegateAccount.

apiConnection?.tx?.assets?.revokeDelegation(assetId, delegateAccount).signAndSend ...