Fixed migration problem

This commit is contained in:
lewis
2025-12-30 23:45:44 +02:00
parent 76506511a1
commit 7be60ea2d1
20 changed files with 321 additions and 147 deletions
@@ -621,6 +621,14 @@
<div class="code-block">
<pre>{`{
"id": "${flow.state.sourceDid}",
"verificationMethod": [
{
"id": "${flow.state.sourceDid}#atproto",
"type": "Multikey",
"controller": "${flow.state.sourceDid}",
"publicKeyMultibase": "${flow.state.targetVerificationMethod?.replace('did:key:', '') || '...'}"
}
],
"service": [
{
"id": "#atproto_pds",
@@ -65,6 +65,7 @@ export function createInboundMigrationFlow() {
error: null,
requires2FA: false,
twoFactorCode: "",
targetVerificationMethod: null,
});
let sourceClient: AtprotoClient | null = null;
@@ -372,6 +373,9 @@ export function createInboundMigrationFlow() {
}
if (state.sourceDid.startsWith("did:web:")) {
const credentials = await localClient.getRecommendedDidCredentials();
state.targetVerificationMethod =
credentials.verificationMethods?.atproto || null;
setStep("did-web-update");
} else {
setProgress({ currentOperation: "Requesting PLC operation token..." });
@@ -406,6 +410,9 @@ export function createInboundMigrationFlow() {
state.targetPassword,
);
if (state.sourceDid.startsWith("did:web:")) {
const credentials = await localClient.getRecommendedDidCredentials();
state.targetVerificationMethod =
credentials.verificationMethods?.atproto || null;
setStep("did-web-update");
} else {
await sourceClient.requestPlcOperationSignature();
@@ -620,6 +627,7 @@ export function createInboundMigrationFlow() {
error: null,
requires2FA: false,
twoFactorCode: "",
targetVerificationMethod: null,
};
sourceClient = null;
clearMigrationState();
+1
View File
@@ -56,6 +56,7 @@ export interface InboundMigrationState {
error: string | null;
requires2FA: boolean;
twoFactorCode: string;
targetVerificationMethod: string | null;
}
export interface OutboundMigrationState {