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 & {
130
130
url : string ;
131
131
} ;
132
132
133
+ type SetStateAction = BaseAction & {
134
+ type : "SETSTATE" ;
135
+ ref : string ;
136
+ value : string ;
137
+ } ;
138
+
133
139
export type EthPersonalSignData = {
134
140
statement : string ;
135
141
version : string ;
@@ -171,6 +177,7 @@ export type ModAction =
171
177
| AddEmbedAction
172
178
| SetInputAction
173
179
| OpenLinkAction
180
+ | SetStateAction
174
181
| EthPersonalSignAction
175
182
| SendEthTransactionAction
176
183
| ExitAction ;
Original file line number Diff line number Diff line change @@ -272,6 +272,10 @@ export interface OpenLinkActionResolver {
272
272
events : OpenLinkActionResolverEvents
273
273
) : void ;
274
274
}
275
+ export interface SetStateActionResolver {
276
+ ref : string ;
277
+ value : string ;
278
+ }
275
279
276
280
export type EthPersonalSignActionResolverInit = {
277
281
data : EthPersonalSignData ;
@@ -855,6 +859,11 @@ export class Renderer {
855
859
} ;
856
860
break ;
857
861
}
862
+ case "SETSTATE" : {
863
+ set ( this . refs , action . ref , this . replaceInlineContext ( action . value ) ) ;
864
+ this . onTreeChange ( ) ;
865
+ break ;
866
+ }
858
867
case "web3.eth.personal.sign" : {
859
868
const promise = new Promise < void > ( ( resolve ) => {
860
869
setTimeout ( ( ) => {
You can’t perform that action at this time.
0 commit comments