forked from blockscout/frontend
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add staked balances to address page
- Loading branch information
1 parent
6ddb901
commit 9c9b9e2
Showing
14 changed files
with
588 additions
and
460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { getEnvValue } from './utils'; | ||
|
||
const apiEndpoint = getEnvValue('NEXT_PUBLIC_STAKING_API_HOST'); | ||
const apiNetwork = getEnvValue('NEXT_PUBLIC_STAKING_API_NETWORK'); | ||
|
||
const stakingApi = Object.freeze({ | ||
endpoint: apiEndpoint, | ||
host: `${ apiEndpoint }/networks/${ apiNetwork }/delegations`, | ||
network: apiNetwork, | ||
}); | ||
|
||
export default stakingApi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export type StakingApi = { | ||
undelegations: Array<StakingApiUndelegations> | null; | ||
amount: number | null; | ||
delegator_address: string | null; | ||
reward: number | null; | ||
validator_address: string | null; | ||
}; | ||
|
||
export type StakingApiUndelegations = { | ||
Amount: number; | ||
Epoch: number; | ||
}; | ||
|
||
export type StakingApiFailed = StakingApi & { | ||
fetchError: true; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.