Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get account #65

Open
kaushal-inexture opened this issue Mar 1, 2022 · 1 comment
Open

How to get account #65

kaushal-inexture opened this issue Mar 1, 2022 · 1 comment

Comments

@kaushal-inexture
Copy link

I am trying to get account using below code but I am not getting account so please help.

var router = NetworkingRouter(RPCEndpoint.devnetSolana)
var account: Account? = null
var solana = Solana(router, auth = object : SolanaAccountStorage{
override fun save(account1: Account): Result {
account = account1
Log.d("Account Publik key", account?.publicKey.toString())
Log.d("Account Secrect key", account?.secretKey.toString())
return Result.success(Unit)
}

        override fun account(): Result<Account> {
            Log.d("Account ", "Account")
            account?.let {
                return Result.success(account!!)
            }
            return Result.failure(Throwable(""))
        }

        override fun clear(): Result<Unit> {
            Log.d("Account ", "Account Clear")
            account = null
            return Result.success(Unit)
        }
    })
@dreamchaser96
Copy link

have you make it work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants