Skip to content

Commit

Permalink
fix: production cloudkit api
Browse files Browse the repository at this point in the history
  • Loading branch information
amper-fb committed Dec 24, 2023
1 parent 2f1c551 commit 456fc8a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
9 changes: 6 additions & 3 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
# SANDBOX
VITE_BACKEND_BASE_URL=https://ncw-demo-dev.2uaqu5aka49io.eu-central-1.cs.amazonlightsail.com
VITE_NCW_SDK_ENV=sandbox
VITE_CLOUDKIT_APITOKEN=03f6ed4411aa4cb58429ab4d4ecf128ef58af762c4297ff149c0c4923379864b
VITE_CLOUDKIT_CONTAINER_ID=iCloud.com.fireblocks.ncw.demo
VITE_CLOUDKIT_ENV=production

# DEV9
# VITE_BACKEND_BASE_URL=https://dev9-ncw-demo.waterballoons.xyz
# VITE_NCW_SDK_ENV=dev9

VITE_CLOUDKIT_APITOKEN=572a0b5cfcb8992031640d1a14fd0ac3bb7c774cc929a0e23cb00af415da51cd
VITE_CLOUDKIT_CONTAINER_ID=iCloud.com.fireblocks.ncw.demo
# VITE_CLOUDKIT_APITOKEN=572a0b5cfcb8992031640d1a14fd0ac3bb7c774cc929a0e23cb00af415da51cd
# VITE_CLOUDKIT_CONTAINER_ID=iCloud.com.fireblocks.ncw.demo
# VITE_CLOUDKIT_ENV=development
15 changes: 7 additions & 8 deletions src/components/BackupAndRecover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const BackupAndRecover: React.FC = () => {
}
}, [passphrases]);


useEffect(() => {
if (!latestBackup) {
getLatestBackup();
Expand Down Expand Up @@ -227,13 +226,13 @@ export const BackupAndRecover: React.FC = () => {
<Card title="Backup/Recover" actions={[googleBackupAction, appleBackupAction, recoverAction]}>
<div id="sign-in-button"></div>
<div id="sign-out-button"></div>
{latestBackup &&
<div>
<div>Last known backup</div>
<div>Location: {latestBackup.location}</div>
<div>Created: {new Date(latestBackup.createdAt).toString()}</div>
</div>
}
{latestBackup && (
<div>
<div>Last known backup</div>
<div>Location: {latestBackup.location}</div>
<div>Created: {new Date(latestBackup.createdAt).toString()}</div>
</div>
)}
{backupCompleted && (
<div className="mockup-code">
<pre>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Cloudkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function useCloudkit() {
signInButton: { id: "sign-in-button", theme: "black" },
signOutButton: { id: "sign-out-button", theme: "black" },
},
environment: "development",
environment: ENV_CONFIG.CLOUDKIT_ENV ?? "development",
},
],
});
Expand Down
1 change: 1 addition & 0 deletions src/env_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export const ENV_CONFIG = {
BACKEND_BASE_URL: import.meta.env.VITE_BACKEND_BASE_URL,
CLOUDKIT_APITOKEN: import.meta.env.VITE_CLOUDKIT_APITOKEN,
CLOUDKIT_CONTAINER_ID: import.meta.env.VITE_CLOUDKIT_CONTAINER_ID,
CLOUDKIT_ENV: import.meta.env.VITE_CLOUDKIT_ENV,
};

0 comments on commit 456fc8a

Please sign in to comment.