File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,12 @@ type OpenLinkAction = BaseAction & {
130130 url : string ;
131131} ;
132132
133+ type SetStateAction = BaseAction & {
134+ type : "SETSTATE" ;
135+ ref : string ;
136+ value : string ;
137+ } ;
138+
133139export type EthPersonalSignData = {
134140 statement : string ;
135141 version : string ;
@@ -171,6 +177,7 @@ export type ModAction =
171177 | AddEmbedAction
172178 | SetInputAction
173179 | OpenLinkAction
180+ | SetStateAction
174181 | EthPersonalSignAction
175182 | SendEthTransactionAction
176183 | ExitAction ;
Original file line number Diff line number Diff line change @@ -272,6 +272,10 @@ export interface OpenLinkActionResolver {
272272 events : OpenLinkActionResolverEvents
273273 ) : void ;
274274}
275+ export interface SetStateActionResolver {
276+ ref : string ;
277+ value : string ;
278+ }
275279
276280export type EthPersonalSignActionResolverInit = {
277281 data : EthPersonalSignData ;
@@ -855,6 +859,11 @@ export class Renderer {
855859 } ;
856860 break ;
857861 }
862+ case "SETSTATE" : {
863+ set ( this . refs , action . ref , this . replaceInlineContext ( action . value ) ) ;
864+ this . onTreeChange ( ) ;
865+ break ;
866+ }
858867 case "web3.eth.personal.sign" : {
859868 const promise = new Promise < void > ( ( resolve ) => {
860869 setTimeout ( ( ) => {
You can’t perform that action at this time.
0 commit comments