-
Notifications
You must be signed in to change notification settings - Fork 5k
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
feat: Add Multichain API to Flask #27782
Open
jiexi
wants to merge
933
commits into
main
Choose a base branch
from
jl/caip-multichain-migrate-core
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,772
−642
Open
Changes from 250 commits
Commits
Show all changes
933 commits
Select commit
Hold shift + click to select a range
af5ae95
Merge branch 'main' into caip25-permission-migration
jiexi 42f2386
Merge remote-tracking branch 'origin/caip25-permission-migration' int…
jiexi afc2629
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
jiexi 43e2e3a
Fix wallet_createSession use getSupportedScopeObjects
jiexi babf3b8
Add back requestPermissionApprovalForOrigin to MMC. Use in requestApp…
jiexi 9d8b687
Rename requestPermissionApprovalForOrigin to requestPermissionApprova…
jiexi 432fcf8
yarn audit
jiexi add8328
Update LavaMoat policies
metamaskbot e66e970
Merge branch 'main' into caip25-permission-migration
jiexi 2071366
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
jiexi ffef7ae
First Multichain API e2e Test (#29209)
adonesky1 aec0472
Merge branch 'main' into caip25-permission-migration
jiexi 8a2203c
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
jiexi 7a13bcc
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi f4af744
Revert "Rename requestPermissionApprovalForOrigin to requestPermissio…
jiexi b991c19
Use requestPermissionApproval again
jiexi 2d747f4
DRY background-api getCaip25Caveat
jiexi bd77c86
Update app/scripts/metamask-controller.js
jiexi 21cbc47
capitalize Snaps in thrown error
jiexi 082a39a
Merge branch 'main' into caip25-permission-migration
jiexi 20b2245
Merge remote-tracking branch 'origin/caip25-permission-migration' int…
jiexi d6dfd27
use isSnapId in background-api
jiexi d2a2d44
jsdoc handlers
jiexi cd0e2d1
Merge branch 'main' into caip25-permission-migration
jiexi d3d5f9b
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
jiexi 0b044e4
Jl/fix api specs multichain (#29487)
jiexi 3f87444
Update app/scripts/metamask-controller.js
jiexi 1ef2033
replace parseInt with hexToBigInt
jiexi b9e61e0
Merge branch 'main' into caip25-permission-migration
jiexi eee52ec
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
jiexi fb2c400
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi 2e1be33
fix bad merge. lint
jiexi 52e6ea2
Merge branch 'main' into caip25-permission-migration
jiexi 8b06c2c
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
jiexi 132e784
Merge branch 'main' into caip25-permission-migration
jiexi b1c0b07
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
jiexi 097ef14
Fix wallet_requestPermissions approval ordering
jiexi 75814f4
Jl/caip multichain/add api specs wallet create session (#29592)
jiexi 43a5aad
Merge branch 'main' into caip25-permission-migration
jiexi 9a42c67
Merge branch 'main' into caip25-permission-migration
jiexi 368fccb
Jl/caip25 permission migration/fix wallet request permissions delay g…
jiexi 60b4a0b
move cannot derive ethAccounts comment to ethAccounts var assignment
jiexi 553f83e
Merge remote-tracking branch 'origin/caip25-permission-migration' int…
jiexi 094abb3
Update app/scripts/lib/rpc-method-middleware/handlers/wallet-revokePe…
jiexi 51dc9d3
add ignoreLock options object to getPermittedAccounts
jiexi 9f2422e
Merge remote-tracking branch 'origin/caip25-permission-migration' int…
jiexi 8a3bc99
remove isMultichainOrigin checks in add/switchEthereumChain and revok…
jiexi 30b1773
Convert request-accounts.ts back to js
jiexi 85782c5
Merge branch 'main' into caip25-permission-migration
jiexi 9542e9c
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
jiexi 3f70fdc
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi af1cb6a
Update app/scripts/metamask-controller.js
jiexi 7e5782b
add wallet_registerOnboarding to Multichain API (#29491)
jiexi 6d861f1
jsdoc createUnsupportedMethodMiddleware
jiexi 49e9ac4
fix migration to skip malformed permission subjects (#29634)
adonesky1 79dc228
Update LavaMoat policies
metamaskbot dbed7a1
Multichain API e2e test: calling `wallet_invokeMethod` on the same da…
ffmcgee725 73ca76f
grant wallet:eip155 for dapps as well
jiexi 5b027f8
annoying persistent local lint
jiexi c1cbb26
Merge remote-tracking branch 'origin/caip25-permission-migration' int…
jiexi c4b62c1
Multichain API E2E Test: wallet_notify (#29623)
ffmcgee725 70b9f05
Merge branch 'main' into caip25-permission-migration
jiexi 3771ebc
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
jiexi 7688c40
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi 9faf0e6
remove unnecessary JSON.stringify in wallet_createSession
jiexi 08ff03d
add missing import
jiexi c7f9adc
remove eip3085 handling from wallet_createSession
jiexi f7f5c28
remove unused hooks
jiexi 9d7a8a4
jsdoc wallet_createSession handler
jiexi f2e64be
remove processScopedProperties
jiexi 9f58f3f
lint
jiexi 61f1182
use preview build 298fc547
jiexi b27d53b
Update app/scripts/lib/rpc-method-middleware/handlers/wallet-requestP…
jiexi bea54cf
move getCaveat in requestPermittedChainsPermissionIncremental to afte…
jiexi 2e078a8
Merge branch 'main' into caip25-permission-migration
jiexi 50748b6
Merge remote-tracking branch 'origin/caip25-permission-migration' int…
jiexi 6aea438
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
jiexi ec4f301
move getCaveat in requestPermittedChainsPermissionIncremental to afte…
jiexi df60de4
Update ui/pages/permissions-connect/connect-page/connect-page.tsx
jiexi 11faff5
Update ui/components/multichain/pages/review-permissions-page/site-ce…
jiexi abc0343
remove delays from sign.flow.ts
jiexi 8d99f45
lint
jiexi 422f379
Merge branch 'main' into caip25-permission-migration
jiexi e932140
lint
jiexi b1d52ad
Merge branch 'main' into caip25-permission-migration
jiexi cec2311
Merge branch 'main' into caip25-permission-migration
jiexi ebee234
Multichain API E2E Test: wallet_revokeSession (#29639)
ffmcgee725 0c0adf8
address partially mutation state bugs (#29682)
adonesky1 1817ba9
Multichain API E2E Test: wallet_createSession called with an existing…
ffmcgee725 6ebcb5f
Jl/restore legacy fixtures (#29674)
jiexi 2846b0d
remove extraneous hooks
adonesky1 19826fe
dedupe
adonesky1 7240c13
lint
adonesky1 f166986
Merge branch 'main' into caip25-permission-migration
jiexi fe7469e
Merge remote-tracking branch 'origin/caip25-permission-migration' int…
jiexi 10d4d9c
Update LavaMoat policies
metamaskbot 492687c
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
jiexi bb38fc4
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi 0ba6f86
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi 16c42b8
use preview build e05b7d3e
jiexi 69a188b
Update LavaMoat policies
metamaskbot 6633fb7
dedupe
adonesky1 113e643
update hookname: getCaveatForOrigin
adonesky1 106e7a6
Update LavaMoat policies
metamaskbot 24fe195
wrap rpcErrors in flask build flags
adonesky1 65bd138
use preview build f3715655
jiexi baf0afc
fix getCaveatForOrigin
adonesky1 4b52240
Merge branch 'main' into caip25-permission-migration
jiexi 20204ec
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
jiexi 9df1ef3
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi 04d64da
use preview build 6244b7be
jiexi b89c40c
lint
jiexi 8776db0
Multichain API E2E test: wallet_sessionChanged (#29706)
ffmcgee725 62621a1
Merge branch 'main' into caip25-permission-migration
adonesky1 113ba76
lint
adonesky1 29d2381
lint
adonesky1 236b2d4
Merge branch 'main' into caip25-permission-migration
jiexi 9d73bd9
jsdoc captureKeyringTypesWithMissingIdentities
jiexi 89ed1b3
Merge remote-tracking branch 'origin/caip25-permission-migration' int…
jiexi eb67f19
jsdoc sortAccountsByLastSelected
jiexi c86e052
Merge branch 'main' into caip25-permission-migration
jiexi ea4294a
Update app/scripts/migrations/138.ts
adonesky1 fdeb41e
Update app/scripts/migrations/138.ts
adonesky1 28094b5
Update app/scripts/migrations/138.ts
adonesky1 ab87b63
add comment/link for BUILT_IN_NETWORKS
adonesky1 9cdf8b7
address feedback / cleanup migration
adonesky1 43a0749
bail out of migration when encountering any data malformation
adonesky1 134f730
make malformation checks against networkConfigurations more strict
adonesky1 27b7353
Merge branch 'main' into caip25-permission-migration
jiexi 8bdde06
Merge remote-tracking branch 'origin/caip25-permission-migration' int…
jiexi fe26dcf
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
jiexi 724e178
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi b2581f4
lint
jiexi 6a6b1bf
Trigger
jiexi b213d94
add isNonEmptyArrayOfStrings to migration
jiexi 2f0a4e5
Merge branch 'main' into caip25-permission-migration
jiexi 0de03cc
Update test/e2e/tests/request-queuing/ui.spec.js
jiexi 9233f06
Revert ui/ducks/bridge/selectors.ts
jiexi dcdee7f
Merge remote-tracking branch 'origin/caip25-permission-migration' int…
jiexi 5357693
Merge branch 'main' into caip25-permission-migration
jiexi 651a40c
cleanup fixtures
jiexi b032101
clean fixtures deprecated-networks.spec.js and switch-custom-network.…
jiexi 4c700fd
remove ERC_4337_ACCOUNT from withPreferencesControllerAdditionalAccou…
jiexi 0f6c9f9
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
adonesky1 79678cd
update yarn.lock post rebase
adonesky1 6865dc5
Update LavaMoat policies
metamaskbot 0412864
dedupe
adonesky1 792306f
fix wallet locked behavior
adonesky1 dea12c0
Update LavaMoat policies
metamaskbot ba9efbb
revert unecessary change to fixtures
jiexi 7797d67
Merge branch 'main' into caip25-permission-migration
jiexi 608ac95
revert unecessary change to fixtures 2
jiexi 03624be
restore styling changes fixture
jiexi bd1e230
undo fixture changes that aren't needed
jiexi 76f77b0
Merge branch 'main' into caip25-permission-migration
jiexi 962c343
lint
jiexi 3d0cfdd
lint
jiexi aba2d8a
Merge branch 'main' into caip25-permission-migration
jiexi 1fb0f29
Update ui/components/multichain/edit-accounts-modal/edit-accounts-mod…
adonesky1 1bf080d
Multichain API E2E Test: handling when MetaMask is password locked (#…
ffmcgee725 5f96f94
Fix wallet_revokePermission spec
jiexi 4762e5c
Merge branch 'main' into caip25-permission-migration
jiexi 18440d6
Merge remote-tracking branch 'origin/caip25-permission-migration' int…
jiexi 15fa319
Merge branch 'main' into caip25-permission-migration
jiexi c1b4b29
Merge branch 'caip25-permission-migration' into jl/caip-multichain-mi…
jiexi 540899a
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi ad7169d
Update LavaMoat policies
metamaskbot d52827e
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 9b74e4c
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi a15a668
use preview build 2ba45577
jiexi a91d9b4
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi f85ad62
Update LavaMoat policies
metamaskbot 6e0dbeb
remove caipPermissionAdapterMiddleware
jiexi 721c85b
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 58be906
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 66d0308
yarn dedupe
jiexi d4410f2
Update LavaMoat policies
metamaskbot b8ae6c3
lint?
jiexi 7f32e4d
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi 0c2a696
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi a69d816
remove unneeded hooks
jiexi cfe4339
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 67dae48
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi d65cabf
fix remove network
jiexi fc286d9
lint
jiexi ea676b4
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 1ff78c6
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 51ad9d9
yarn
jiexi 7199240
Restore wallet locked behavior
jiexi 96c77a2
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi ef209cd
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 0c27eb1
move missing caveat check
jiexi 6bcd229
lint
jiexi 464e972
remove connect.spec
jiexi 2d08956
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 5bd7d64
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 16f9f38
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi d5ab747
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi acdac1f
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 970ad3b
lint
jiexi 94c8dd9
WIP: adapt to new CAIP-25 approval UI
jiexi 08c32f0
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi ec9ddca
update approval UI to modify only evm portion of returned CAIP-25 per…
jiexi e0c548e
update wallet_createSession to pass in a validated CAIP-25 permission…
jiexi 95e1275
lint
jiexi c18440b
Fix connect page supported request chain id check
jiexi ffbf346
WIP: fix snaps request accounts
jiexi a265050
Fix snaps account grant
jiexi 9b6cf67
lint
jiexi 16c0b5d
lint
jiexi 80c0fd8
Update app/scripts/lib/rpc-method-middleware/handlers/wallet-createSe…
jiexi 4feca47
delete password-locked spec
jiexi c40afc6
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi c5cfbde
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi cf15677
remove console.log
jiexi 22e6e6b
loosen wallet_revokeSession fixture assert
jiexi 6d511af
remove secp256k1 v5 force resolution
adonesky1 a139124
yarn.lock reset
adonesky1 7cce39d
Update LavaMoat policies
metamaskbot 6867030
lint
adonesky1 3e7c8ae
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 66a4c65
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi 6311273
Update app/scripts/lib/rpc-method-middleware/handlers/request-account…
adonesky1 b07aac2
remove comment
adonesky1 ccb8644
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 164d189
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi 22957ef
Update LavaMoat policies
FrederikBolding 3613394
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi f054b45
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi 97a5097
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi e22b7bc
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi f665043
yarn dedupe
jiexi ecdb0b8
Update app/scripts/metamask-controller.js
jiexi e1d3631
DRY multichain eth subscription add and removal
jiexi fd30905
Merge remote-tracking branch 'origin/jl/caip-multichain-migrate-core'…
jiexi f90be7c
update getRemovedAuthorizations to include removed scopes as well as …
jiexi 8a5f2cf
switch to createDeepEqualSelector
jiexi 551b56c
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 75db2f7
add default value to createUnsupportedMethodMiddleware
jiexi 1e20517
Bump api-specs to 0.10.14
jiexi 84cc007
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi d5445f1
yarn dedupe
jiexi eed6a10
Lint
jiexi 1d43a4a
codefence UNSUPPORTED_RPC_METHODS in MMC
jiexi 03a40aa
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 5152d05
bump @metamask/api-specs to 0.10.15
jiexi 7103714
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 57c5874
Fix sessionChanged not firing
jiexi c960844
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi 701820c
Merge branch 'main' into jl/caip-multichain-migrate-core
jiexi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
13 changes: 13 additions & 0 deletions
13
.yarn/patches/@json-schema-spec-json-pointer-npm-0.1.2-3d06119887.patch
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,13 @@ | ||
diff --git a/lib/index.js b/lib/index.js | ||
index f5795884311124b221d91f488ed45750eb6e9c80..e030d6f8d8e85e6d1350c565d36ad48bc49af881 100644 | ||
--- a/lib/index.js | ||
+++ b/lib/index.js | ||
@@ -25,7 +25,7 @@ class Ptr { | ||
}); | ||
return `/${tokens.join("/")}`; | ||
} | ||
- eval(instance) { | ||
+ shmeval(instance) { | ||
for (const token of this.tokens) { | ||
if (instance.hasOwnProperty(token)) { | ||
instance = instance[token]; |
13 changes: 13 additions & 0 deletions
13
.yarn/patches/@json-schema-tools-reference-resolver-npm-1.2.6-4e1497c16d.patch
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,13 @@ | ||
diff --git a/build/resolve-pointer.js b/build/resolve-pointer.js | ||
index d5a8ec7486250cd17572eb0e0449725643fc9842..044e74bb51a46e9bf3547f6d7a84763b93260613 100644 | ||
--- a/build/resolve-pointer.js | ||
+++ b/build/resolve-pointer.js | ||
@@ -27,7 +27,7 @@ exports.default = (function (ref, root) { | ||
try { | ||
var withoutHash = ref.replace("#", ""); | ||
var pointer = json_pointer_1.default.parse(withoutHash); | ||
- return pointer.eval(root); | ||
+ return pointer.shmeval(root); | ||
} | ||
catch (e) { | ||
throw new InvalidJsonPointerRefError(ref, e.message); |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Could we use runtime checks here rather than build-time? It doesn't look like this would cut out any major chunks of code, nothing that would make a major bundle size difference. Therefore doing this at runtime would seemingly have no downside, and would be much easier to lint/test/maintain