mirror of
https://tangled.org/tranquil.farm/tranquil-pds
synced 2026-09-12 13:16:04 +00:00
Fixed migration problem
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -56,6 +56,7 @@ export interface InboundMigrationState {
|
||||
error: string | null;
|
||||
requires2FA: boolean;
|
||||
twoFactorCode: string;
|
||||
targetVerificationMethod: string | null;
|
||||
}
|
||||
|
||||
export interface OutboundMigrationState {
|
||||
|
||||
Reference in New Issue
Block a user