Skip to content

Commit 3b5468d

Browse files
committed
Fixing store crash
1 parent d5abef2 commit 3b5468d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/src/main/java/org/thoughtcrime/securesms/tokenpage/TokenPageViewModel.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,10 @@ class TokenPageViewModel @Inject constructor(
237237
// Note: We pass this in to the token page so we can call it when we refresh the page.
238238
private suspend fun getNodeData() {
239239
withContext(Dispatchers.Default) {
240-
val myPublicKey = getLocalNumber(context)
240+
val myPublicKey = prefs.getLocalNumber() ?: return@withContext
241+
241242
val getSwarmSetPromise: Promise<Set<Snode>, Exception> =
242-
SnodeAPI.getSwarm(myPublicKey!!)
243+
SnodeAPI.getSwarm(myPublicKey)
243244

244245
val numSessionNodesInOurSwarm = try {
245246
// Get the count of Session nodes in our swarm (technically in the range 1..10, but

0 commit comments

Comments
 (0)