Skip to content

Instantly share code, notes, and snippets.

@fortmarek
Created February 28, 2020 16:20
Show Gist options
  • Save fortmarek/f06f53b85fab364665e1347bd479e40b to your computer and use it in GitHub Desktop.
Save fortmarek/f06f53b85fab364665e1347bd479e40b to your computer and use it in GitHub Desktop.
End function
private func endVote(_ contractAddress: String) {
guard let wallet = userRepository.state.value.wallet else { return }
tezosClient
.rateContract(at: contractAddress)
#1
.end()
.callPublisher(from: wallet, amount: Tez(0))
.handleEvents(receiveOutput: { [weak self] output in
print(output)
#2
self?.endVote(of: contractAddress)
}, receiveCompletion: { completion in
print(completion)
})
.startAndStore(in: &cancellables)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment