Skip to content

Commit 3706b62

Browse files
committed
fix: menu state
1 parent 3e68f1e commit 3706b62

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

  • packages/extension/src

packages/extension/src/libs/menu-state/index.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ class MenuState {
1414
}
1515

1616
async getState(): Promise<IState> {
17-
const state = this.storage.get(StorageKeys.menuState);
17+
const state = await this.storage.get(StorageKeys.menuState);
1818
if (!state) {
1919
const newState: IState = {
20-
isExpanded: true
21-
}
22-
return newState
20+
isExpanded: true,
21+
};
22+
return newState;
2323
}
2424
return state;
2525
}
@@ -30,10 +30,9 @@ class MenuState {
3030
}
3131
async setIsExpanded(isExpanded: boolean): Promise<void> {
3232
const state: IState = await this.getState();
33-
const newState: IState = { ...state, isExpanded }
33+
const newState: IState = { ...state, isExpanded };
3434
await this.setState(newState);
3535
}
36-
3736
}
3837

3938
export default MenuState;

packages/extension/src/providers/common/ui/send-transaction/nft-select-list/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const nftList = computed(() => {
6666
const allItems: NFTItemWithCollectionName[] = [];
6767
nftCollections.value.forEach(col => {
6868
col.items.forEach(item => {
69-
allItems.push({ ...item, ...{ collectionName: col.name } });
69+
allItems.push({ ...item, ...{ collectionName: col.name || '' } });
7070
});
7171
});
7272
if (searchNFT.value && searchNFT.value !== '') {

0 commit comments

Comments
 (0)