File tree Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -13,22 +13,20 @@ export async function handleGetAccounts() {
13
13
// Find and rename unnamed accounts
14
14
const unnamedAccounts = fullAccounts . filter ( ( account ) => ! account . name ) ;
15
15
16
- if ( unnamedAccounts . length > 0 ) {
17
- // Try to rename each unnamed account
18
- for ( const account of unnamedAccounts ) {
19
- try {
20
- // Use last 4 characters of the address
21
- const newName = `unnamed-account-${ account . address . slice ( - 4 ) } ` ;
16
+ // Try to rename each unnamed account
17
+ for ( const account of unnamedAccounts ) {
18
+ try {
19
+ // Use last 4 characters of the address
20
+ const newName = `unnamed-account-${ account . address . slice ( - 4 ) } ` ;
22
21
23
- await rpcClient . wallet . renameAccount ( {
24
- account : "" ,
25
- newName,
26
- } ) ;
27
- // Update the account name in our local array
28
- account . name = newName ;
29
- } catch ( error ) {
30
- console . error ( `Failed to rename account ${ account . address } :` , error ) ;
31
- }
22
+ await rpcClient . wallet . renameAccount ( {
23
+ account : "" ,
24
+ newName,
25
+ } ) ;
26
+ // Update the account name in our local array
27
+ account . name = newName ;
28
+ } catch ( error ) {
29
+ console . error ( `Failed to rename account ${ account . address } :` , error ) ;
32
30
}
33
31
}
34
32
You can’t perform that action at this time.
0 commit comments