async function loadNemo () {
console.log('loading libnemo')
- libnemo = await import('https://cdn.jsdelivr.net/npm/libnemo@0.0.13')
+ libnemo = await import('https://cdn.jsdelivr.net/npm/libnemo@0.0.14/dist/main.min.js')
console.log('loaded libnemo')
}
oldOption.remove()
}
}
- const newOptions = options.map(o => new Option(o.text, o.value))
- if (newOptions.length > 0) {
- select.add(...newOptions)
- }
+ options.map(o => select.add(new Option(o.text, o.value)))
} catch (err) {
console.error(err)
notify.error(`Error resetting options for select ${id}`)
walletSelect = document.getElementById('wallet')
if (walletSelect?.value) {
const accounts = await getFromStorage('accounts')
- const accountData = accounts.filter(a => {
- console.log(JSON.parse(a))
- const { walletId } = JSON.parse(a)
- return walletId === walletSelect.value
+ const accountData = accounts.map(a => JSON.parse(a)).filter(a => {
+ return a.walletId === walletSelect.value
})
return accountData
}