blockful-io / shutter-staking-dapp

https://shutter-staking-dapp.vercel.app
MIT License
0 stars 0 forks source link

[Data Source] Get user stakes #45

Open FrancoAguzzi opened 3 months ago

FrancoAguzzi commented 3 months ago

Depending on what the user role is

A stakes list should be taken either from Staking or from Delegate contract. These user stakes should be get by calling respective Smart-Contract "getUserStakeIds" function. After this, "stakes(stakeId)" function should be called for each individual stake. After that, the following data structure should be mounted by a function in the edge of our dApp and Smart-Contract data:

{
  id: string;
  keyper: Address;
  amount: number;
  status: LockStatus;
  unlockDate: number;
}