"use strict";var i=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var m=(t,e,s)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var k=(t,e)=>{for(var s in e)i(t,s,{get:e[s],enumerable:!0})},d=(t,e,s,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of c(e))!g.call(t,r)&&r!==s&&i(t,r,{get:()=>e[r],enumerable:!(o=l(e,r))||o.enumerable});return t};var p=t=>d(i({},"__esModule",{value:!0}),t);var n=(t,e,s)=>(m(t,typeof e!="symbol"?e+"":e,s),s);var y={};k(y,{LocalStorageAdapter:()=>a});module.exports=p(y);var a=class{constructor(){n(this,"storageKey","userTokens")}async getTokens(){let e=localStorage.getItem(this.storageKey);return e?JSON.parse(e):[]}async addToken(e){let s=await this.getTokens();s.push(e),localStorage.setItem(this.storageKey,JSON.stringify(s))}async removeToken(e){let s=await this.getTokens();s=s.filter(o=>o.address!==e),localStorage.setItem(this.storageKey,JSON.stringify(s))}async getTokenPrice(e){let s=localStorage.getItem("tokenPrices");return s?JSON.parse(s)[e]:0}async saveTokenPrice(e,s){let o=localStorage.getItem("tokenPrices"),r=o?JSON.parse(o):{};r[e]=s,localStorage.setItem("tokenPrices",JSON.stringify(r))}async updateToken(e){let s=await this.getTokens();s=s.map(o=>o.address===e.address?e:o),localStorage.setItem(this.storageKey,JSON.stringify(s))}async getUserWalletAliases(){throw new Error("Method not implemented.")}async upsertWalletAlias(e,s){throw console.log("upsertWalletAlias",e,s),new Error("Method not implemented.")}};0&&(module.exports={LocalStorageAdapter});
//# sourceMappingURL=LocalStorageAdapter.js.map