File tree Expand file tree Collapse file tree
.changelog/unreleased/bug-fixes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ - Fixing how token balances are displayed in case of missing --token option.
2+ ([ #1528 ] ( https://github.com/anoma/namada/pull/1528 ) )
Original file line number Diff line number Diff line change @@ -314,7 +314,8 @@ pub async fn query_transparent_balance<
314314 }
315315 ( None , Some ( owner) ) => {
316316 for token in tokens {
317- let prefix = token. to_db_key ( ) . into ( ) ;
317+ let prefix =
318+ token:: balance_key ( & token, & owner. address ( ) . unwrap ( ) ) ;
318319 let balances =
319320 query_storage_prefix :: < C , token:: Amount > ( client, & prefix)
320321 . await ;
@@ -329,7 +330,7 @@ pub async fn query_transparent_balance<
329330 }
330331 }
331332 ( Some ( token) , None ) => {
332- let prefix = token. to_db_key ( ) . into ( ) ;
333+ let prefix = token:: balance_prefix ( & token ) ;
333334 let balances =
334335 query_storage_prefix :: < C , token:: Amount > ( client, & prefix) . await ;
335336 if let Some ( balances) = balances {
You can’t perform that action at this time.
0 commit comments