Skip to content

Commit

Permalink
713/handle action errors (forbole#714)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuash authored Feb 17, 2022
1 parent 74ab648 commit 3035b14
Show file tree
Hide file tree
Showing 10 changed files with 1,346 additions and 1,180 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## Changes
- Updated market cap display ([\#698](https://github.com/forbole/big-dipper-2.0-cosmos/issues/698))
- Optimised validator details and account details to prevent random polling behavior ([\#703](https://github.com/forbole/big-dipper-2.0-cosmos/issues/703))
- Add hasura actions error handling in account details ([\#713](https://github.com/forbole/big-dipper-2.0-cosmos/issues/713))
- Display accounts even if balance is 0 and does not exist ([\#692](https://github.com/forbole/big-dipper-2.0-cosmos/issues/692))

# base-v2.0.0-rc1 - 2021-02-07

Expand Down
1 change: 1 addition & 0 deletions codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ generates:
./src/graphql/types.tsx:
documents:
- './src/**/*.graphql'
- './src/**/*_actions.ts'
- '!./src/**/desmos_profile.graphql'
schema: https://gql.desmos.forbole.com/v1/graphql
plugins:
Expand Down
2 changes: 1 addition & 1 deletion src/configs/general_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"github": {
"reportIssue": "https://github.com/forbole/big-dipper-2.0-cosmos/issues"
},
"version": "base-v2.0.0"
"version": "base-v2.0.0-rc1"
}
36 changes: 34 additions & 2 deletions src/graphql/account.graphql → src/graphql/account_actions.ts
Original file line number Diff line number Diff line change
@@ -1,43 +1,75 @@

query Account($address: String!, $validatorAddress: String!) {
export const AccountCommissionDocument = /* GraphQL */`
query AccountCommission($validatorAddress: String!) {
commission: action_validator_commission_amount(address: $validatorAddress) {
coins
}
}
`;

export const AccountWithdrawalAddressDocument = /* GraphQL */`
query AccountWithdrawalAddress($address: String!) {
withdrawalAddress: action_delegator_withdraw_address(address: $address) {
address
}
}
`;

export const AccountBalancesDocument = /* GraphQL */`
query AccountBalances($address: String!) {
accountBalances: action_account_balance(address: $address) {
coins
}
}
`;

export const AccountDelegationBalanceDocument = /* GraphQL */`
query AccountDelegationBalance($address: String!) {
delegationBalance: action_delegation_total(address: $address) {
coins
}
}
`;

export const AccountUnbondingBalanceDocument = /* GraphQL */`
query AccountUnbondingBalance($address: String!) {
unbondingBalance: action_unbonding_delegation_total(address: $address) {
coins
}
}
`;

export const AccountDelegationRewardsDocument = /* GraphQL */`
query AccountDelegationRewards($address: String!) {
delegationRewards: action_delegation_reward(address: $address) {
validatorAddress: validator_address
coins
}
}
`;

export const AccountDelegationsDocument = /* GraphQL */`
query AccountDelegations($address: String!, $offset: Int = 0, $limit: Int = 10) {
delegations: action_delegation(address: $address, limit: $limit, offset: $offset, count_total: true){
delegations
pagination
}
}
`;

export const AccountRedelegationsDocument = /* GraphQL */`
query AccountRedelegations($address: String!, $offset: Int = 0, $limit: Int = 10) {
redelegations: action_redelegation(address: $address, limit: $limit, offset: $offset, count_total: true){
redelegations
pagination
}
}
`;

export const AccountUndelegationsDocument = /* GraphQL */`
query AccountUndelegations($address: String!, $offset: Int = 0, $limit: Int = 10) {
undelegations: action_unbonding_delegation(address: $address, limit: $limit, offset: $offset, count_total: true){
undelegations: unbonding_delegations
pagination
}
}
`;
Loading

0 comments on commit 3035b14

Please sign in to comment.