-
Notifications
You must be signed in to change notification settings - Fork 98
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
Fabo/fetch policy #3390
Fabo/fetch policy #3390
Changes from 5 commits
b2fe4f5
fe1c343
4178c16
9abb337
df6651e
346e6a5
494b6f1
a86069a
40adf63
6bcf1e8
53b0116
a7c23b9
fab4134
0071062
42f5e54
1d2d091
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[Fixed] [#3390](https://github.com/cosmos/lunie/pull/3390) Fix ActionModal data being out of date if a live update of data happened @faboweb |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -477,7 +477,6 @@ export default { | |
userAddress: this.session.address, | ||
rewards: this.rewards, | ||
totalRewards: this.overview.totalRewards, | ||
delegations: this.delegations, | ||
bondDenom: this.network.stakingDenom, | ||
isExtensionAccount: this.isExtensionAccount, | ||
account: this.overview.accountInformation | ||
|
@@ -731,14 +730,14 @@ export default { | |
overview(networkId: $networkId, address: $address) { | ||
totalRewards | ||
liquidStake | ||
totalStake | ||
accountInformation { | ||
accountNumber | ||
sequence | ||
} | ||
} | ||
} | ||
`, | ||
fetchPolicy: "cache-and-network", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. very cool. can we set this globablly or does it have to be set per component? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can, but may want to not do it for things like |
||
variables() { | ||
/* istanbul ignore next */ | ||
return { | ||
|
@@ -763,11 +762,8 @@ export default { | |
query NetworkActionModal($networkId: String!) { | ||
network(id: $networkId) { | ||
id | ||
testnet | ||
stakingDenom | ||
chain_id | ||
rpc_url | ||
api_url | ||
action_send | ||
action_claim_rewards | ||
action_delegate | ||
|
@@ -791,39 +787,6 @@ export default { | |
return data.network | ||
} | ||
}, | ||
delegations: { | ||
query: gql` | ||
query DelegationsActionModal( | ||
$networkId: String! | ||
$delegatorAddress: String! | ||
) { | ||
delegations( | ||
networkId: $networkId | ||
delegatorAddress: $delegatorAddress | ||
) { | ||
amount | ||
validator { | ||
operatorAddress | ||
} | ||
} | ||
} | ||
`, | ||
skip() { | ||
/* istanbul ignore next */ | ||
return !this.session.address | ||
}, | ||
variables() { | ||
/* istanbul ignore next */ | ||
return { | ||
networkId: this.networkId, | ||
delegatorAddress: this.session.address | ||
} | ||
}, | ||
update(data) { | ||
/* istanbul ignore next */ | ||
return data.delegations | ||
} | ||
}, | ||
$subscribe: { | ||
userTransactionAdded: { | ||
variables() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,6 +119,7 @@ export default { | |
} | ||
} | ||
`, | ||
fetchPolicy: "cache-and-network", | ||
skip() { | ||
return !this.address | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come this is no longer needed? don't we use this for undelegation counts and redelegations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find any use of delegations in the context. 5 withdraws are calculated based on the rewards.