Skip to content

Commit

Permalink
Allow custom UI in transaction insights
Browse files Browse the repository at this point in the history
  • Loading branch information
FrederikBolding committed Dec 14, 2022
1 parent 2ed41d3 commit 5aa3f34
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/snaps-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@babel/core": "^7.18.6",
"@babel/types": "^7.18.7",
"@metamask/providers": "^10.2.1",
"@metamask/snaps-ui": "^0.26.2",
"@metamask/utils": "^3.3.1",
"@noble/hashes": "^1.1.3",
"@scure/base": "^1.1.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/snaps-utils/src/handlers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { StreamProvider } from '@metamask/providers';
import { Json, JsonRpcRequest } from '@metamask/utils';
import { Component } from '@metamask/snaps-ui';

import { AccountId, ChainId, RequestArguments } from './namespace';

Expand Down Expand Up @@ -34,7 +35,7 @@ export type OnRpcRequestHandler = (args: {
* If the snap has no insights about the transaction, this should be `null`.
*/
export type OnTransactionResponse = {
insights: { [key: string]: Json } | null;
ui: Component;
};

/**
Expand Down
3 changes: 2 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3013,7 +3013,7 @@ __metadata:
languageName: unknown
linkType: soft

"@metamask/snaps-ui@workspace:packages/snaps-ui":
"@metamask/snaps-ui@^0.26.2, @metamask/snaps-ui@workspace:packages/snaps-ui":
version: 0.0.0-use.local
resolution: "@metamask/snaps-ui@workspace:packages/snaps-ui"
dependencies:
Expand Down Expand Up @@ -3060,6 +3060,7 @@ __metadata:
"@metamask/eslint-config-nodejs": ^11.0.1
"@metamask/eslint-config-typescript": ^11.0.0
"@metamask/providers": ^10.2.1
"@metamask/snaps-ui": ^0.26.2
"@metamask/utils": ^3.3.1
"@noble/hashes": ^1.1.3
"@scure/base": ^1.1.1
Expand Down

0 comments on commit 5aa3f34

Please sign in to comment.