Skip to content

Commit ed75ffc

Browse files
committed
[trello.com/c/1lX3h2xx] rename method
1 parent 09401b6 commit ed75ffc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Adamant/Modules/Wallets/ERC20/ERC20WalletService.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ extension ERC20WalletService {
673673

674674
guard
675675
let timestampHex = result.result?.timestamp,
676-
let timestampInt = UInt64(timestampHex.stripHexPrefix(), radix: 16)
676+
let timestampInt = UInt64(timestampHex.trimHexPrefix(), radix: 16)
677677
else {
678678
throw WalletServiceError.remoteServiceError(message: "Invalid timestamp in block response")
679679
}
@@ -682,8 +682,8 @@ extension ERC20WalletService {
682682
}
683683
}
684684

685-
private extension String {
686-
func stripHexPrefix() -> String {
685+
extension String {
686+
func trimHexPrefix() -> String {
687687
hasPrefix("0x") ? String(dropFirst(2)) : self
688688
}
689689
}

Adamant/Modules/Wallets/Ethereum/EthWalletService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ extension EthWalletService {
856856

857857
guard
858858
let timestampHex = result.result?.timestamp,
859-
let timestampInt = UInt64(timestampHex.stripHexPrefix(), radix: 16)
859+
let timestampInt = UInt64(timestampHex.trimHexPrefix(), radix: 16)
860860
else {
861861
throw WalletServiceError.remoteServiceError(message: "Invalid timestamp in block response")
862862
}

0 commit comments

Comments
 (0)