diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-06-14 20:00:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-14 20:00:16 -0500 |
commit | 3663ee57f3e3d83a03ca105e0dda11cd94f68c98 (patch) | |
tree | 8f6b6b60a316e8446862cde7027fa6687cc04597 /src/state/models/session.ts | |
parent | 775b5e6578e5567bee333fc776b8f38072214832 (diff) | |
download | voidsky-3663ee57f3e3d83a03ca105e0dda11cd94f68c98.tar.zst |
Add testnet warning (#880)
* Add testnet warning * Add watermarks to posts * Call the test environment the Sandbox
Diffstat (limited to 'src/state/models/session.ts')
-rw-r--r-- | src/state/models/session.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/state/models/session.ts b/src/state/models/session.ts index aa9c97750..57082b818 100644 --- a/src/state/models/session.ts +++ b/src/state/models/session.ts @@ -10,6 +10,7 @@ import {isObj, hasProp} from 'lib/type-guards' import {networkRetry} from 'lib/async/retry' import {z} from 'zod' import {RootStoreModel} from './root-store' +import {IS_PROD} from 'lib/constants' export type ServiceDescription = DescribeServer.OutputSchema @@ -104,6 +105,13 @@ export class SessionModel { return this.accounts.filter(acct => acct.did !== this.data?.did) } + get isSandbox() { + if (!this.data) { + return false + } + return !IS_PROD(this.data.service) + } + serialize(): unknown { return { data: this.data, |