Skip to content

Commit

Permalink
Clean up supporting message structs
Browse files Browse the repository at this point in the history
  • Loading branch information
radeknovis committed Feb 2, 2024
1 parent 923d061 commit fc4fc76
Show file tree
Hide file tree
Showing 4 changed files with 276 additions and 288 deletions.
275 changes: 0 additions & 275 deletions Sources/Web3Modal/Core/MagicMessage.swift

This file was deleted.

27 changes: 27 additions & 0 deletions Sources/Web3Modal/Core/MagicRequest.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import Foundation

struct MagicResponse: Decodable {
enum MessageType: String, Decodable {
case syncThemeSuccess = "@w3m-frame/SYNC_THEME_SUCCESS"
case syncDataSuccess = "@w3m-frame/SYNC_DAPP_DATA_SUCCESS"
case connectEmailSuccess = "@w3m-frame/CONNECT_EMAIL_SUCCESS"
case connectEmailError = "@w3m-frame/CONNECT_EMAIL_ERROR"
case isConnectSuccess = "@w3m-frame/IS_CONNECTED_SUCCESS"
case isConnectError = "@w3m-frame/IS_CONNECTED_ERROR"
case connectOtpSuccess = "@w3m-frame/CONNECT_OTP_SUCCESS"
case connectOtpError = "@w3m-frame/CONNECT_OTP_ERROR"
case getUserSuccess = "@w3m-frame/GET_USER_SUCCESS"
case getUserError = "@w3m-frame/GET_USER_ERROR"
case sessionUpdate = "@w3m-frame/SESSION_UPDATE"
case switchNetworkSuccess = "@w3m-frame/SWITCH_NETWORK_SUCCESS"
case switchNetworkError = "@w3m-frame/SWITCH_NETWORK_ERROR"
case rpcRequestSuccess = "@w3m-frame/RPC_REQUEST_SUCCESS"
case rpcRequestError = "@w3m-frame/RPC_REQUEST_ERROR"
}

var type: MessageType
var payload: AnyCodable?
var rt: String?
var jwt: String?
var action: String?
}
Loading

0 comments on commit fc4fc76

Please sign in to comment.