Skip to content

Commit

Permalink
chore: connection status management (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
elefantel authored Aug 26, 2024
1 parent a12ba07 commit 4f29750
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Example/metamask-ios-sdk/TransactionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ struct TransactionView: View {
Section {
Text("Value")
.modifier(TextCallout())
TextField("Value", text: $amount)
TextField("Value", text: $value)
.modifier(TextCaption())
.frame(minHeight: 32)
.modifier(TextCurvature())
Expand Down Expand Up @@ -94,7 +94,7 @@ struct TransactionView: View {
let transaction = Transaction(
to: to,
from: metamaskSDK.account,
value: amount
value: value
)

let parameters: [Transaction] = [transaction]
Expand Down
2 changes: 2 additions & 0 deletions Sources/metamask-ios-sdk/Classes/SDK/MetaMaskSDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public extension MetaMaskSDK {

func clearSession() {
ethereum.clearSession()
connected = false
}

func terminateConnection() {
Expand Down Expand Up @@ -218,6 +219,7 @@ extension MetaMaskSDK: EthereumEventsDelegate {

func accountChanged(_ account: String) {
self.account = account
connected = true
}
}

Expand Down
2 changes: 1 addition & 1 deletion metamask-ios-sdk.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'metamask-ios-sdk'
s.version = '0.8.3'
s.version = '0.8.4'
s.summary = 'Enable users to easily connect with their MetaMask Mobile wallet.'
s.swift_version = '5.5'

Expand Down

0 comments on commit 4f29750

Please sign in to comment.