Skip to content

Commit e258943

Browse files
committed
fix: removed unnecessary dispute template in frontend
1 parent 141833b commit e258943

File tree

2 files changed

+1
-67
lines changed

2 files changed

+1
-67
lines changed

web/src/hooks/queries/useTransactionsQuery.ts

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ export const transactionFragment = graphql(`
1717
buyerFee
1818
sellerFee
1919
lastFeePaymentTime
20-
templateData
21-
templateDataMappings
2220
status
2321
transactionHash
2422
payments {

web/src/pages/NewTransaction/NavigationButtons/DepositPaymentButton.tsx

+1-65
Original file line numberDiff line numberDiff line change
@@ -74,71 +74,9 @@ const DepositPaymentButton: React.FC = () => {
7474
}
7575
}, [allowance, transactionValue]);
7676

77-
const disputeTemplate = `{
78-
"$schema": "../NewDisputeTemplate.schema.json",
79-
"title": "Escrow dispute: {{escrowTitle}}",
80-
"description": "{{deliverableText}}",
81-
"question": "Which party abided by the terms of the contract?",
82-
"answers": [
83-
{
84-
"title": "Refund the Buyer",
85-
"description": "Select this to return the funds to the Buyer."
86-
},
87-
{
88-
"title": "Pay the Seller",
89-
"description": "Select this to release the funds to the Seller."
90-
}
91-
],
92-
"policyURI": "/ipfs/XxxxxXXX/escrow-general-policy.pdf",
93-
"attachment": {
94-
"label": "Transaction Terms",
95-
"uri": "{{{extraDescriptionUri}}}"
96-
},
97-
"frontendUrl": "https://escrow-v2.kleros.builders/#/transactions/{{externalDisputeID}}",
98-
"arbitrableChainID": "421614",
99-
"arbitrableAddress": "0xFromContext",
100-
"arbitratorChainID": "421614",
101-
"arbitratorAddress": "0xA54e7A16d7460e38a8F324eF46782FB520d58CE8",
102-
"metadata": {
103-
"buyer": "{{buyer}}",
104-
"seller": "{{seller}}",
105-
"amount": "{{amount}}",
106-
"token": "{{token}}",
107-
"deadline": "{{deadline}}",
108-
"transactionUri": "{{{transactionUri}}}"
109-
},
110-
"category": "Escrow",
111-
"specification": "KIPXXX",
112-
"aliases": {
113-
"Buyer": "{{buyer}}",
114-
"Seller": "{{seller}}"
115-
},
116-
"version": "1.0"
117-
}
118-
`;
119-
120-
const dataMappings = `[
121-
{
122-
"type": "graphql",
123-
"endpoint": "https://gateway-arbitrum.network.thegraph.com/api/{{{graphApiKey}}}/subgraphs/id/3aZxYcZpZL5BuVhuUupqVrCV8VeNyZEvjmPXibyPHDFQ",
124-
"query": "query GetTransaction($transactionId: ID!) { escrow(id: $transactionId) { transactionUri buyer seller amount token deadline } }",
125-
"variables": {
126-
"transactionId": "{{externalDisputeID}}"
127-
},
128-
"seek": ["escrow.transactionUri", "escrow.buyer", "escrow.seller", "escrow.amount", "escrow.token", "escrow.deadline"],
129-
"populate": ["transactionUri", "buyer", "seller", "amount", "token", "deadline"]
130-
},
131-
{
132-
"type": "fetch/ipfs/json",
133-
"ipfsUri": "{{{transactionUri}}}",
134-
"seek": ["title", "description", "extraDescriptionUri"],
135-
"populate": ["escrowTitle", "deliverableText", "extraDescriptionUri"]
136-
}
137-
]`;
138-
13977
const { config: createNativeTransactionConfig } = usePrepareEscrowUniversalCreateNativeTransaction({
14078
enabled: isNativeTransaction && ethAddressPattern.test(finalRecipientAddress),
141-
args: [deadlineTimestamp, transactionUri, finalRecipientAddress, disputeTemplate, dataMappings],
79+
args: [deadlineTimestamp, transactionUri, finalRecipientAddress],
14280
value: transactionValue,
14381
});
14482

@@ -154,8 +92,6 @@ const DepositPaymentButton: React.FC = () => {
15492
deadlineTimestamp,
15593
transactionUri,
15694
finalRecipientAddress,
157-
disputeTemplate,
158-
dataMappings,
15995
],
16096
});
16197

0 commit comments

Comments
 (0)