aboutsummaryrefslogtreecommitdiffstats
path: root/src/ark
diff options
context:
space:
mode:
Diffstat (limited to 'src/ark')
-rw-r--r--src/ark/manager.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ark/manager.js b/src/ark/manager.js
index 4814a26..03e8e18 100644
--- a/src/ark/manager.js
+++ b/src/ark/manager.js
@@ -103,6 +103,13 @@ export class ArkManager {
this.psa = hs?.psa;
this.serverPub = hex.decode(this.info.serverPubkey);
+ // Pre-namespacing state can now be proven to belong to this server (the
+ // vtxo wire format names its cosigner), so claim it before deciding.
+ if (!this.state.serverPubkey && this.storage.adopt) {
+ const adopted = this.storage.adopt(this.info.serverPubkey);
+ if (adopted) this.state = adopted;
+ }
+
// A vtxo is only meaningful against the server that cosigned it. State
// carried over from a different ASP (a provider switch, or a snapshot
// adopted from the pre-namespacing key) would show phantom balance and