Skip to content

Commit 69b7cc9

Browse files
committed
feat: skip adding native token if it already exists
1 parent 0ea5d99 commit 69b7cc9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/storage/storage.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ export class Storage implements IStorage {
100100
* Set the native token config on the store
101101
*/
102102
async saveNativeToken(): Promise<void> {
103-
await this.store.saveToken(this.getNativeTokenData());
103+
if ((await this.store.getToken(NATIVE_TOKEN_UID)) === null) {
104+
await this.store.saveToken(this.getNativeTokenData());
105+
}
104106
}
105107

106108
/**

0 commit comments

Comments
 (0)