Skip to content

Commit 4bf1bf7

Browse files
refactor: move polyfills to infrastructure directory
1 parent 688f95b commit 4bf1bf7

11 files changed

Lines changed: 4 additions & 3 deletions

File tree

packages/snap/snap.manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/MetaMask/snap-solana-wallet.git"
88
},
99
"source": {
10-
"shasum": "NfjYYpYE9M/qdyVE1zrmo40xozAuPrqS2ayUgh3eS1M=",
10+
"shasum": "0iEzdRoC/alH82Y+QsIUmTVNN+JlZHujDh2nwkapDSs=",
1111
"location": {
1212
"npm": {
1313
"filePath": "dist/bundle.js",

packages/snap/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import { CronjobMethod } from './core/handlers/onCronjob/cronjobs/CronjobMethod'
2929
import { onProtocolRequest as onProtocolRequestHandler } from './core/handlers/onProtocolRequest/onProtocolRequest';
3030
import { handlers as onRpcRequestHandlers } from './core/handlers/onRpcRequest';
3131
import { RpcRequestMethod } from './core/handlers/onRpcRequest/types';
32-
import { install as installPolyfills } from './core/polyfills';
3332
import { isSnapRpcError } from './core/utils/errors';
3433
import { getClientStatus } from './core/utils/interface';
3534
import logger from './core/utils/logger';
@@ -39,6 +38,7 @@ import { eventHandlers as confirmSignMessageEvents } from './features/confirmati
3938
import { eventHandlers as confirmSignAndSendTransactionEvents } from './features/confirmation/views/ConfirmTransactionRequest/events';
4039
import { eventHandlers as sendFormEvents } from './features/send/views/SendForm/events';
4140
import { eventHandlers as transactionConfirmationEvents } from './features/send/views/TransactionConfirmation/events';
41+
import { installPolyfills } from './infrastructure';
4242
import snapContext, {
4343
clientRequestHandler,
4444
keyring,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './polyfills';

packages/snap/src/core/polyfills/dom-exception/index.ts renamed to packages/snap/src/infrastructure/polyfills/dom-exception/index.ts

File renamed without changes.

packages/snap/src/core/polyfills/ed25519/index.ts renamed to packages/snap/src/infrastructure/polyfills/ed25519/index.ts

File renamed without changes.

packages/snap/src/core/polyfills/ed25519/polyfill.ts renamed to packages/snap/src/infrastructure/polyfills/ed25519/polyfill.ts

File renamed without changes.

packages/snap/src/core/polyfills/ed25519/utils/buffer-source-as-uint8-array.ts renamed to packages/snap/src/infrastructure/polyfills/ed25519/utils/buffer-source-as-uint8-array.ts

File renamed without changes.

packages/snap/src/core/polyfills/ed25519/utils/is-ed25519-algorithm.ts renamed to packages/snap/src/infrastructure/polyfills/ed25519/utils/is-ed25519-algorithm.ts

File renamed without changes.

packages/snap/src/core/polyfills/ed25519/utils/uint8-array-as-buffer-source.ts renamed to packages/snap/src/infrastructure/polyfills/ed25519/utils/uint8-array-as-buffer-source.ts

File renamed without changes.

packages/snap/src/core/polyfills/index.ts renamed to packages/snap/src/infrastructure/polyfills/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { install as installQueueMicrotaskPolyfill } from './queue-microtask';
55
/**
66
* Installs all polyfills.
77
*/
8-
export function install() {
8+
export function installPolyfills() {
99
installDOMExceptionPolyfill();
1010
installEd25519Polyfill();
1111
installQueueMicrotaskPolyfill();

0 commit comments

Comments
 (0)