Skip to content

Commit

Permalink
fix legacy auth call (#687)
Browse files Browse the repository at this point in the history
  • Loading branch information
Funkatronics authored Jan 25, 2024
1 parent 79f127b commit c18f883
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class MobileWalletAdapter(
authToken?.let { token ->
reauthorize(identityUri, iconUri, identityName, token)
} ?: run {
authorize(identityUri, iconUri, identityName, RpcCluster.Custom(blockchain.cluster))
authorize(identityUri, iconUri, identityName, blockchain.rpcCluster)
}
}.also {
authToken = it.authToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ sealed class Blockchain(
) {
val fullName
get() = "$name:$cluster"

@Deprecated(
"RpcCluster is deprecated as of MWA 2.0, this property is preserved for backwards compatibility with legacy endpoints",
level = DeprecationLevel.WARNING
)
val rpcCluster: RpcCluster = when (cluster) {
"mainnet", ProtocolContract.CLUSTER_MAINNET_BETA -> RpcCluster.MainnetBeta
ProtocolContract.CLUSTER_TESTNET -> RpcCluster.Testnet
ProtocolContract.CLUSTER_DEVNET -> RpcCluster.Devnet
else -> RpcCluster.Custom(cluster)
}
}

sealed class Solana {
Expand Down

0 comments on commit c18f883

Please sign in to comment.