Skip to content

Commit

Permalink
Fix: Nonce value not incremented for the second transaction trustwall…
Browse files Browse the repository at this point in the history
  • Loading branch information
vikmeup committed Aug 7, 2018
1 parent 9f20bcf commit 3b1b0bd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Trust/EtherClient/Providers/Providers/GetNonceProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ final class GetNonceProvider: NonceProvider {
}

func fetchNextNonce(completion: @escaping (Result<BigInt, AnyError>) -> Void) {
fetch { result in
fetch { [weak self] result in
guard let `self` = self else { return }
switch result {
case .success(let nonce):
completion(.success(nonce + 1))
let res = self.nextNonce ?? nonce + 1
completion(.success(res))
case .failure(let error):
completion(.failure(error))
}
Expand Down

0 comments on commit 3b1b0bd

Please sign in to comment.