AlphaWallet / AlphaWallet/alpha-wallet-ios

TokenScript access crash

未关闭
#5,899 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Swift
星标
631
派生
384
PR 合并指标
30 天内没有已合并 PR

描述

> Got a very strange crash at https://github.com/oa-s/alpha-wallet-ios/blob/52081f6e986dbd33c5c76d66cc42907585d95ffb/modules/AlphaWalletFoundation/AlphaWalletFoundation/TokenScriptClient/Models/TokenScriptFileIndices.swift#L68
>
> ```
> if contractsToFileNames[contract].isEmpty {
> ```
>
> It crashed complaining that it's nil. It looks like the follow extension (which is in the same module) isn't loaded?
>
> ```
> extension Optional where Wrapped: Collection {
> public var isEmpty: Bool {
> switch self {
> case .none:
> return true
> case .some(let value):
> return value.isEmpty
> }
> }
> }
> ```
>
> After I added some debug statements, I can't reproduce it anymore, even after removing the debug statements. I don't think it's related to this PR.

hmm, haven't seen that

_Originally posted by @oa-s in https://github.com/AlphaWallet/alpha-wallet-ios/issues/5855#issuecomment-1334898003_

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。