Skip to content

Commit

Permalink
Fix sample message variable (trustwallet#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
hewigovens authored Jun 29, 2020
1 parent d93752b commit abd375c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Example/TrustSDK/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ViewController: UIViewController {

func setupSignMessageButton() {
let data = Data("Some message".utf8)
let message = Data("\u{19}Ethereum Signed Message:\n\(data.count)".utf8)
let message = Data("\u{19}Ethereum Signed Message:\n\(data.count)".utf8) + data
let hash = message.sha3(.keccak256)

signMesageButton.apply(theme: TrustButtonTheme
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ To request signing message, you have to encode or hash your message in hex-encod

```swift
let data = Data("Some message".utf8)
let message = Data("\u{19}Ethereum Signed Message:\n\(data.count)".utf8)
let message = Data("\u{19}Ethereum Signed Message:\n\(data.count)".utf8) + data
let hash = message.sha3(.keccak256)
TrustSDK.signers.ethereum.sign(message: hash) { result in
switch result {
Expand Down

0 comments on commit abd375c

Please sign in to comment.