Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/network-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"uuid": "^7.0.3"
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/cli": "^1.21.4",
"@graphql-codegen/import-types-preset": "^1.18.1",
"@graphql-codegen/typescript": "^1.22.0",
"@graphql-codegen/typescript-document-nodes": "^1.17.11",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,45 @@ export class CreateProposalsFixture extends StandardizedFixture {
assert.isNotNull(qProposal.details.bloatBond)
assert.isDefined(qProposal.details.bloatBond)
assert.equal(qProposal.details.bloatBond!.toString(), details.bloatBond.unwrap().toString())
break
}
break
}
case 'UpdateArgoBridgeConstraints': {
Utils.assert(qProposal.details.__typename === 'UpdateArgoBridgeConstraintsProposalDetails')
const details = proposalDetails.asUpdateArgoBridgeConstraints
if (details.bridgingFee.isSome) {
assert.isNotNull(qProposal.details.bridgingFee)
assert.isDefined(qProposal.details.bridgingFee)
assert.equal(qProposal.details.bridgingFee!.toString(), details.bridgingFee.unwrap().toString())
}
// repeat the same if case with details: operatorAccount, pauserAccounts, thawnDuration, remoteChains
if (details.operatorAccount.isSome) {
assert.isNotNull(qProposal.details.operatorAccount)
assert.isDefined(qProposal.details.operatorAccount)
assert.equal(qProposal.details.operatorAccount!.toString(), details.operatorAccount.unwrap().toString())
}
if (details.pauserAccounts.isSome) {
assert.isNotNull(qProposal.details.pauserAccounts)
assert.isDefined(qProposal.details.pauserAccounts)
assert.sameDeepMembers(
qProposal.details.pauserAccounts!,
details.pauserAccounts.unwrap().map((a) => a.toString())
)
}
if (details.thawnDuration.isSome) {
assert.isNotNull(qProposal.details.thawnDuration)
assert.isDefined(qProposal.details.thawnDuration)
assert.equal(qProposal.details.thawnDuration!.toString(), details.thawnDuration.unwrap().toString())
}
if (details.remoteChains.isSome) {
assert.isNotNull(qProposal.details.remoteChains)
assert.isDefined(qProposal.details.remoteChains)
assert.sameDeepMembers(
qProposal.details.remoteChains!.map((a) => a.toString()),
details.remoteChains.unwrap().map((a) => a.toString())
)
}
break
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions tests/network-tests/src/graphql/queries/proposals.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,14 @@ fragment ProposalDetailsFields on ProposalDetails {
ammSellTxFees
bloatBond
}

... on UpdateArgoBridgeConstraintsProposalDetails {
operatorAccount
pauserAccounts
bridgingFee
thawnDuration
remoteChains
}
}

fragment ProposalFields on Proposal {
Expand Down
Loading