Merge pull request #6995 from AlphaWallet/wip-confirmed-replacement-re-issue-with-idfields-work,-and-refresh-works-now

Fix: not watching TokenScript body changes
pull/6996/head
Hwee-Boon Yar 1 year ago committed by GitHub
commit ff0e8d0172
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      modules/AlphaWalletTokenScript/AlphaWalletTokenScript/Models/AssetDefinitionStore.swift

@ -79,7 +79,7 @@ public class AssetDefinitionStore: NSObject {
.eraseToAnyPublisher() .eraseToAnyPublisher()
} }
public func assetBodyChanged(for contract: AlphaWallet.Address) -> AnyPublisher<Void, Never> { private func assetBodyChanged(for contract: AlphaWallet.Address) -> AnyPublisher<Void, Never> {
return bodyChangeSubject return bodyChangeSubject
.filter { $0 == contract } .filter { $0 == contract }
.mapToVoid() .mapToVoid()
@ -87,7 +87,7 @@ public class AssetDefinitionStore: NSObject {
.eraseToAnyPublisher() .eraseToAnyPublisher()
} }
public func assetSignatureChanged(for contract: AlphaWallet.Address) -> AnyPublisher<Void, Never> { private func assetSignatureChanged(for contract: AlphaWallet.Address) -> AnyPublisher<Void, Never> {
return signatureChangeSubject return signatureChangeSubject
.filter { $0 == contract } .filter { $0 == contract }
.mapToVoid() .mapToVoid()
@ -97,7 +97,7 @@ public class AssetDefinitionStore: NSObject {
public func assetsSignatureOrBodyChange(for contract: AlphaWallet.Address) -> AnyPublisher<Void, Never> { public func assetsSignatureOrBodyChange(for contract: AlphaWallet.Address) -> AnyPublisher<Void, Never> {
return Publishers return Publishers
.Merge(assetSignatureChanged(for: contract), assetSignatureChanged(for: contract)) .Merge(assetSignatureChanged(for: contract), assetBodyChanged(for: contract))
.mapToVoid() .mapToVoid()
.eraseToAnyPublisher() .eraseToAnyPublisher()
} }

Loading…
Cancel
Save