Skip to content

Commit 324daba

Browse files
authored
Merge branch 'main' into feat/add-type-signed-data-v4-with-salt
2 parents f841a9c + 554a788 commit 324daba

File tree

5 files changed

+28
-6
lines changed

5 files changed

+28
-6
lines changed

.github/workflows/build-lint-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
build-lint-test:
1010
name: Build, Lint, and Test
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
1414
node-version: [18.x, 20.x]
@@ -25,7 +25,7 @@ jobs:
2525
- run: yarn test
2626
all-jobs-pass:
2727
name: All jobs pass
28-
runs-on: ubuntu-20.04
28+
runs-on: ubuntu-latest
2929
needs:
3030
- build-lint-test
3131
steps:

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
## [9.3.0]
9+
### Added
10+
- feat: support version 2.0.0 of EIP-5792 ([#402](https://github.com/MetaMask/test-dapp/pull/402))
11+
812
## [9.2.0]
913
### Changed
1014
- Support updated send calls result ([#396](https://github.com/MetaMask/test-dapp/pull/396))
@@ -249,7 +253,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
249253
- Fix repository standardization issues ([#118](https://github.com/MetaMask/test-dapp/pull/118))
250254
- Fix addEthereumChain button disable logic ([#93](https://github.com/MetaMask/test-dapp/pull/93))
251255

252-
[Unreleased]: https://github.com/MetaMask/test-dapp/compare/v9.2.0...HEAD
256+
[Unreleased]: https://github.com/MetaMask/test-dapp/compare/v9.3.0...HEAD
257+
[9.3.0]: https://github.com/MetaMask/test-dapp/compare/v9.2.0...v9.3.0
253258
[9.2.0]: https://github.com/MetaMask/test-dapp/compare/v9.1.0...v9.2.0
254259
[9.1.0]: https://github.com/MetaMask/test-dapp/compare/v9.0.0...v9.1.0
255260
[9.0.0]: https://github.com/MetaMask/test-dapp/compare/v8.13.0...v9.0.0

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metamask/test-dapp",
3-
"version": "9.2.0",
3+
"version": "9.3.0",
44
"description": "A simple dapp used in MetaMask e2e tests.",
55
"engines": {
66
"node": ">= 18.0.0"

src/components/transactions/eip5792/getCapabilities.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ export function getCapabilitiesComponent(parentContainer) {
1111
id="eip5792AccountInput"
1212
/>
1313
</div>
14+
<div class="form-group">
15+
<label>Chain IDs</label>
16+
<input
17+
class="form-control"
18+
type="text"
19+
id="eip5792ChainIdsInput"
20+
/>
21+
</div>
1422
1523
<button
1624
class="btn btn-primary btn-lg btn-block mb-3"
@@ -26,6 +34,7 @@ export function getCapabilitiesComponent(parentContainer) {
2634
);
2735

2836
const accountInput = document.getElementById('eip5792AccountInput');
37+
const chainIdsInput = document.getElementById('eip5792ChainIdsInput');
2938
const getCapabilitiesButton = document.getElementById(
3039
'eip5792GetCapabilitiesButton',
3140
);
@@ -46,9 +55,16 @@ export function getCapabilitiesComponent(parentContainer) {
4655

4756
getCapabilitiesButton.onclick = async () => {
4857
try {
58+
const params = [accountInput.value];
59+
60+
if (chainIdsInput.value) {
61+
const chainIds = chainIdsInput.value.split(',').map((id) => id.trim());
62+
params.push(chainIds);
63+
}
64+
4965
const result = await globalContext.provider.request({
5066
method: 'wallet_getCapabilities',
51-
params: [accountInput.value],
67+
params,
5268
});
5369

5470
resultOutput.innerHTML = JSON.stringify(result, null, 2);

src/components/transactions/eip5792/sendCalls.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import globalContext from '../../..';
22

3-
const VERSION = '1.0';
3+
const VERSION = '2.0.0';
44

55
const DEFAULT_CALLS = [
66
{
@@ -148,6 +148,7 @@ export function sendCallsComponent(parentContainer) {
148148
version: VERSION,
149149
from,
150150
chainId,
151+
atomicRequired: true,
151152
calls,
152153
};
153154
}

0 commit comments

Comments
 (0)