File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1183,8 +1183,8 @@ class TinyChainInstance {
11831183 typeof to !== 'string' ||
11841184 from . length < 1 ||
11851185 to . length < 1 ||
1186- ! this . #signer. validateAddress ( from , 'guess' ) . valid ||
1187- ! this . #signer. validateAddress ( to , 'guess' ) . valid
1186+ ( from !== '1' && ! this . #signer. validateAddress ( from , 'guess' ) . valid ) ||
1187+ ( to !== '0' && ! this . #signer. validateAddress ( to , 'guess' ) . valid )
11881188 )
11891189 throw new Error ( 'Invalid from/to address!' ) ;
11901190
Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ const tinyWalletSimulation = async () => {
9696 . catch ( ( err ) => console . log ( red ( "❌ As expected, Bob can't send from Charlie:" ) , err . message ) ) ;
9797
9898 const block4 = createBlock ( {
99+ gasOptions : { gasLimit : 52000n } ,
99100 signer : bob ,
100101 payload : 'Bob pays back' ,
101102 transfers : [
@@ -104,6 +105,11 @@ const tinyWalletSimulation = async () => {
104105 to : charlie . getAddress ( ) ,
105106 amount : 1000000n ,
106107 } ,
108+ {
109+ from : bob . getAddress ( ) ,
110+ to : '0' ,
111+ amount : 2250n ,
112+ } ,
107113 ] ,
108114 } ) ;
109115 await chain . mineBlock ( miner . getAddress ( ) , block4 ) ;
You can’t perform that action at this time.
0 commit comments