Added optional Explorer/Indexer
Build Service / BuildPackage (push) Has been cancelled

This commit is contained in:
2026-05-20 15:43:38 -04:00
parent 2cdc4a5f34
commit e41ff31221
27 changed files with 1431 additions and 70 deletions
+14 -1
View File
@@ -1,3 +1,4 @@
import { storeJson } from '../fileModels/storeJson'
import { i18n } from '../i18n'
import { sdk } from '../sdk'
import { dataDir, SPACED_CHAIN } from '../utils'
@@ -23,6 +24,18 @@ export const exportWallet = sdk.Action.withoutInput(
// run
async ({ effects }) => {
const spacedAuth = await storeJson.read((s) => s.spacedAuth).once()
if (!spacedAuth) {
return {
version: '1',
title: i18n('Failure'),
message: i18n('Could not export wallet: ${error}', {
error: 'spacedAuth missing from store.json',
}),
result: null,
}
}
const mounts = sdk.Mounts.of().mountVolume({
volumeId: 'main',
subpath: null,
@@ -32,7 +45,7 @@ export const exportWallet = sdk.Action.withoutInput(
const cmd = [
`mkdir -p ${BACKUP_DIR}`,
`/root/.cargo/bin/space-cli --chain ${SPACED_CHAIN} --rpc-cookie ${dataDir}/${SPACED_CHAIN}/.cookie exportwallet ${BACKUP_PATH}`,
`/root/.cargo/bin/space-cli --chain ${SPACED_CHAIN} --rpc-user ${spacedAuth.username} --rpc-password ${spacedAuth.password} exportwallet ${BACKUP_PATH}`,
].join(' && ')
const result = await sdk.SubContainer.withTemp(