File tree 1 file changed +15
-3
lines changed
crates/core/src/interpreter/backend 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -69,16 +69,28 @@ async fn get_account(
69
69
for field in & fields {
70
70
match field {
71
71
AccountField :: Balance => {
72
- account. balance = Some ( provider. get_balance ( * address) . await ?) ;
72
+ if let Ok ( balance) = provider. get_balance ( * address) . await {
73
+ account. balance = Some ( balance) ;
74
+ } else {
75
+ account. balance = None ;
76
+ }
73
77
}
74
78
AccountField :: Nonce => {
75
- account. nonce = Some ( provider. get_transaction_count ( * address) . await ?) ;
79
+ if let Ok ( nonce) = provider. get_transaction_count ( * address) . await {
80
+ account. nonce = Some ( nonce) ;
81
+ } else {
82
+ account. nonce = None ;
83
+ }
76
84
}
77
85
AccountField :: Address => {
78
86
account. address = Some ( * address) ;
79
87
}
80
88
AccountField :: Code => {
81
- account. code = Some ( provider. get_code_at ( * address) . await ?) ;
89
+ if let Ok ( code) = provider. get_code_at ( * address) . await {
90
+ account. code = Some ( code) ;
91
+ } else {
92
+ account. code = None ;
93
+ }
82
94
}
83
95
AccountField :: Chain => {
84
96
account. chain = Some ( chain. clone ( ) ) ;
You can’t perform that action at this time.
0 commit comments