mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-08-12 09:23:20 +00:00
Fix mintToCacheDTO call for cashu-ts v4 signature
cashu-ts v4 dropped the leading `unit` parameter from
CashuKeyChain.mintToCacheDTO; the signature is now
(mintUrl, allKeysets, allKeys). Both call sites still passed `unit` first,
shifting mintUrl into the allKeysets slot. At runtime mintToCacheDTO does
allKeysets.map(...) on what is actually the mintUrl string, throwing
"TypeError: undefined is not a function" — which surfaced as a failed topup
mint right after getCachedWalletKeys, before mintProofs logged its counter.
Verified against the installed runtime (cashu-ts 4.2.1, cashu-ts.es.js): the
impl takes 3 args and cashu-ts calls it internally as
mintToCacheDTO(this.mintUrl, keysets, keys). Sibling of the earlier
loadMintFromCache v4 signature fix (c61e73a); unrelated to the op-sqlite
migration (the DB layer raises AppError, never a bare TypeError).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
8e8960365d
commit
d62ac12dfd
@@ -343,7 +343,7 @@ export const WalletStoreModel = types
|
||||
})
|
||||
|
||||
if (mintInstance.mintInfo && mintInstance.keysets?.length && mintInstance.keys?.length) {
|
||||
const keychainCache = CashuKeyChain.mintToCacheDTO(unit, mintUrl, [...mintInstance.keysets], [...mintInstance.keys])
|
||||
const keychainCache = CashuKeyChain.mintToCacheDTO(mintUrl, [...mintInstance.keysets], [...mintInstance.keys])
|
||||
newSeedWallet.loadMintFromCache(mintInstance.mintInfo, keychainCache)
|
||||
} else {
|
||||
yield newSeedWallet.loadMint()
|
||||
@@ -372,7 +372,7 @@ export const WalletStoreModel = types
|
||||
})
|
||||
|
||||
if (mintInstance.mintInfo && mintInstance.keysets?.length && mintInstance.keys?.length) {
|
||||
const keychainCache = CashuKeyChain.mintToCacheDTO(unit, mintUrl, [...mintInstance.keysets], [...mintInstance.keys])
|
||||
const keychainCache = CashuKeyChain.mintToCacheDTO(mintUrl, [...mintInstance.keysets], [...mintInstance.keys])
|
||||
newWallet.loadMintFromCache(mintInstance.mintInfo, keychainCache)
|
||||
} else {
|
||||
yield newWallet.loadMint()
|
||||
|
||||
Reference in New Issue
Block a user