-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Changes proposed in this pull request: - Interaction with the wc library extracted to a `ApproverImpl` class behind a testable interface - Approving logic handles `requiredNamespaces` and `optionalNamespaces` correctly - Added template-based tests for the approving function
- Loading branch information
1 parent
22dade7
commit 994b3ac
Showing
17 changed files
with
1,281 additions
and
45 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
39 changes: 39 additions & 0 deletions
39
MultisigTests/Logic/WalletConnectManagerTestData.bundle/01_proposal.json
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,39 @@ | ||
{ | ||
"proposer": { | ||
"description": "Explore DeFi liquidity pools or create your own. Provide liquidity to accumulate yield from swap fees while retaining your token exposure as prices move", | ||
"url": "https://app.balancer.fi", | ||
"name": "Balancer", | ||
"icons": [ | ||
"https://app.balancer.fi/favicon.ico" | ||
] | ||
}, | ||
"requiredNamespaces": { | ||
}, | ||
"optionalNamespaces": { | ||
}, | ||
"pairingTopic": "45bfa73feb1dcd24142a6603a735d2f47463e3662cdacc99c55213a5f7b79794", | ||
"proposal": { | ||
"requiredNamespaces": { | ||
}, | ||
"relays": [ | ||
{ | ||
"protocol": "irn" | ||
} | ||
], | ||
"proposer": { | ||
"metadata": { | ||
"url": "https://app.balancer.fi", | ||
"description": "Explore DeFi liquidity pools or create your own. Provide liquidity to accumulate yield from swap fees while retaining your token exposure as prices move", | ||
"name": "Balancer", | ||
"icons": [ | ||
"https://app.balancer.fi/favicon.ico" | ||
] | ||
}, | ||
"publicKey": "49dda9830d2e7139d8580c44d4a10be9e209c38442f542e5ca176d34867a5279" | ||
}, | ||
"optionalNamespaces": { | ||
} | ||
}, | ||
"id": "49dda9830d2e7139d8580c44d4a10be9e209c38442f542e5ca176d34867a5279" | ||
} | ||
|
65 changes: 65 additions & 0 deletions
65
MultisigTests/Logic/WalletConnectManagerTestData.bundle/02_proposal.json
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,65 @@ | ||
{ | ||
"proposer": { | ||
"description": "Explore DeFi liquidity pools or create your own. Provide liquidity to accumulate yield from swap fees while retaining your token exposure as prices move", | ||
"url": "https://app.balancer.fi", | ||
"name": "Balancer", | ||
"icons": [ | ||
"https://app.balancer.fi/favicon.ico" | ||
] | ||
}, | ||
"requiredNamespaces": { | ||
}, | ||
"optionalNamespaces": { | ||
"eip155": { | ||
"chains": [ | ||
"eip155:2" | ||
], | ||
"methods": [ | ||
"personal_sign", | ||
"eth_sendTransaction" | ||
], | ||
"events": [ | ||
"chainChanged", | ||
"accountsChanged" | ||
] | ||
} | ||
}, | ||
"pairingTopic": "45bfa73feb1dcd24142a6603a735d2f47463e3662cdacc99c55213a5f7b79794", | ||
"proposal": { | ||
"requiredNamespaces": { | ||
}, | ||
"relays": [ | ||
{ | ||
"protocol": "irn" | ||
} | ||
], | ||
"proposer": { | ||
"metadata": { | ||
"url": "https://app.balancer.fi", | ||
"description": "Explore DeFi liquidity pools or create your own. Provide liquidity to accumulate yield from swap fees while retaining your token exposure as prices move", | ||
"name": "Balancer", | ||
"icons": [ | ||
"https://app.balancer.fi/favicon.ico" | ||
] | ||
}, | ||
"publicKey": "49dda9830d2e7139d8580c44d4a10be9e209c38442f542e5ca176d34867a5279" | ||
}, | ||
"optionalNamespaces": { | ||
"eip155": { | ||
"methods": [ | ||
"personal_sign", | ||
"eth_sendTransaction" | ||
], | ||
"events": [ | ||
"chainChanged", | ||
"accountsChanged" | ||
], | ||
"chains": [ | ||
"eip155:2" | ||
] | ||
} | ||
} | ||
}, | ||
"id": "49dda9830d2e7139d8580c44d4a10be9e209c38442f542e5ca176d34867a5279" | ||
} | ||
|
37 changes: 37 additions & 0 deletions
37
MultisigTests/Logic/WalletConnectManagerTestData.bundle/03_approval.json
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,37 @@ | ||
{ | ||
"eip155": { | ||
"chains": [ | ||
"eip155:42161" | ||
], | ||
"accounts": [ | ||
"eip155:42161:0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" | ||
], | ||
"methods": [ | ||
"eth_accounts", | ||
"wallet_requestPermissions", | ||
"wallet_getPermissions", | ||
"personal_sign", | ||
"eth_sign", | ||
"wallet_scanQRCode", | ||
"wallet_addEthereumChain", | ||
"eth_signTypedData_v3", | ||
"eth_signTypedData_v4", | ||
"eth_sendRawTransaction", | ||
"eth_sendTransaction", | ||
"wallet_registerOnboarding", | ||
"eth_signTypedData", | ||
"eth_requestAccounts", | ||
"eth_signTransaction", | ||
"wallet_watchAsset", | ||
"wallet_switchEthereumChain" | ||
], | ||
"events": [ | ||
"connect", | ||
"message", | ||
"chainChanged", | ||
"accountsChanged", | ||
"disconnect" | ||
] | ||
} | ||
} | ||
|
Oops, something went wrong.