Skip to content

Commit d5fdb41

Browse files
authored
Merge pull request #163 from MetaMask/feat/account-api-v2
feat: account api v2
2 parents fa3178f + 92c7c91 commit d5fdb41

File tree

13 files changed

+1846
-601
lines changed

13 files changed

+1846
-601
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ env:
88
PRICE_API_BASE_URL: ${{ vars.PRICE_API_BASE_URL }}
99
STORE_PERMISSIONS_ENABLED: ${{ vars.STORE_PERMISSIONS_ENABLED }}
1010
ACCOUNT_API_BASE_URL: ${{ vars.ACCOUNT_API_BASE_URL }}
11+
TOKENS_API_BASE_URL: ${{ vars.TOKENS_API_BASE_URL }}
1112
SUPPORTED_CHAINS: ${{ vars.SUPPORTED_CHAINS }}
1213
GATOR_PERMISSIONS_PROVIDER_SNAP_ID: ${{ vars.GATOR_PERMISSIONS_PROVIDER_SNAP_ID }}
1314
MESSAGE_SIGNING_SNAP_ID: ${{ vars.MESSAGE_SIGNING_SNAP_ID }}

packages/gator-permissions-snap/.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ MESSAGE_SIGNING_SNAP_ID=local:http://localhost:8080
2121
SNAP_ENV=production
2222
STORE_PERMISSIONS_ENABLED=false
2323
PRICE_API_BASE_URL=https://price.api.cx.metamask.io
24-
ACCOUNT_API_BASE_URL=https://account.api.cx.metamask.io
24+
ACCOUNT_API_BASE_URL=https://accounts.api.cx.metamask.io
25+
TOKENS_API_BASE_URL=https://tokens.api.cx.metamask.io
2526
KERNEL_SNAP_ID=npm:@metamask/permissions-kernel-snap
2627
MESSAGE_SIGNING_SNAP_ID=npm:@metamask/message-signing-snap

packages/gator-permissions-snap/snap.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const {
1111
PRICE_API_BASE_URL,
1212
STORE_PERMISSIONS_ENABLED,
1313
ACCOUNT_API_BASE_URL,
14+
TOKENS_API_BASE_URL,
1415
SUPPORTED_CHAINS,
1516
KERNEL_SNAP_ID,
1617
MESSAGE_SIGNING_SNAP_ID,
@@ -59,6 +60,12 @@ if (!ACCOUNT_API_BASE_URL) {
5960
);
6061
}
6162

63+
if (!TOKENS_API_BASE_URL) {
64+
throw new InternalError(
65+
'TOKENS_API_BASE_URL must be set as an environment variable.',
66+
);
67+
}
68+
6269
if (!SUPPORTED_CHAINS) {
6370
throw new InternalError(
6471
'SUPPORTED_CHAINS must be set as an environment variable.',
@@ -79,6 +86,7 @@ const config: SnapConfig = {
7986
PRICE_API_BASE_URL,
8087
STORE_PERMISSIONS_ENABLED,
8188
ACCOUNT_API_BASE_URL,
89+
TOKENS_API_BASE_URL,
8290
SUPPORTED_CHAINS,
8391
KERNEL_SNAP_ID,
8492
MESSAGE_SIGNING_SNAP_ID,

0 commit comments

Comments
 (0)