Skip to content

Commit

Permalink
Merge pull request #16 from stevysmith/feat/expose-signer-private-key
Browse files Browse the repository at this point in the history
Cleanup Naming and Fix demo PushUser
  • Loading branch information
MdTeach authored Oct 24, 2023
2 parents c560b33 + 691e321 commit 58a8dff
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion PushIosDemo/PushIosDemo/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct ContentView: View {

func connect() async {
do {
let user = try await Push.User.get(
let user = try await PushUser.get(
account: "0xD26A7BF7fa0f8F1f3f73B056c9A67565A6aFE63c", env: .STAGING)!
print(user)
} catch {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Channels/Opt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ extension PushChannel {
}

public struct SubscribeOption {
let signer: TypedSinger
let signer: TypedSigner
let channelAddress: String
let env: ENV

public init(
signer: TypedSinger,
signer: TypedSigner,
channelAddress: String,
env: ENV
) {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Helpers/Eth/Signer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ public protocol Signer {
func getAddress() async throws -> String
}

public protocol TypedSinger {
public protocol TypedSigner {
func getEip712Signature(message: String)
async throws -> String
func getAddress() async throws -> String
}
}
4 changes: 2 additions & 2 deletions Tests/helpers/Signer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public struct SignerPrivateKey: Push.Signer {
}
}

public struct MockEIP712OptinSigner: TypedSinger {
public struct MockEIP712OptinSigner: TypedSigner {
public func getEip712Signature(message: String)
async throws -> String
{
Expand All @@ -42,7 +42,7 @@ public struct MockEIP712OptinSigner: TypedSinger {
}
}

public struct MockEIP712OptoutSigner: TypedSinger {
public struct MockEIP712OptoutSigner: TypedSigner {
public func getEip712Signature(message: String)
async throws -> String
{
Expand Down
8 changes: 4 additions & 4 deletions docs/Channels.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ let result:Bool = try await PushChannel.subscribe(
<details>
<summary><b>Signer defination</b></summary>

Here `Signer` implements to the protocol `TypedSinger`
Here `Signer` implements to the protocol `TypedSigner`
```swift
public protocol TypedSinger {
public protocol TypedSigner {
func getEip712Signature(message: String)
async throws -> String
func getAddress() async throws -> String
Expand Down Expand Up @@ -170,9 +170,9 @@ let result:Bool = try await PushChannel.unsubscribe(

<details>
<summary><b>Signer defination</b></summary>
Here `Signer` implements to the protocol `TypedSinger`
Here `Signer` implements to the protocol `TypedSigner`
```swift
public protocol TypedSinger {
public protocol TypedSigner {
func getEip712Signature(message: String)
async throws -> String
func getAddress() async throws -> String
Expand Down

0 comments on commit 58a8dff

Please sign in to comment.