From 5f26442df65e015fdbcad50d45fd5b57af0f0ca2 Mon Sep 17 00:00:00 2001 From: Hwee-Boon Yar Date: Thu, 14 Nov 2019 16:45:25 +0800 Subject: [PATCH] Fix: Detection of spawnable meetup contract for display --- .../ViewModels/ImportMagicTokenViewControllerViewModel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AlphaWallet/Market/ViewModels/ImportMagicTokenViewControllerViewModel.swift b/AlphaWallet/Market/ViewModels/ImportMagicTokenViewControllerViewModel.swift index a3bdde807..4344a7915 100644 --- a/AlphaWallet/Market/ViewModels/ImportMagicTokenViewControllerViewModel.swift +++ b/AlphaWallet/Market/ViewModels/ImportMagicTokenViewControllerViewModel.swift @@ -338,7 +338,7 @@ struct ImportMagicTokenViewControllerViewModel { if let tokenHolder = tokenHolder, tokenHolder.isSpawnableMeetupContract { //Not the best check, but we assume that even if the data is just partially available, we can show something //TODO get rid of this. Do we even use "building" as spawable check anymore? Testing `is String` is wrong anyway. But probably harmless for now - if case .some(.subscribable(let subscribable)) = tokenHolder.values["building"]?.value, subscribable.value is String { + if case .some(.subscribable(let subscribable)) = tokenHolder.values["building"]?.value, subscribable.value?.stringValue != nil { return false } else { return true