Open thiendangvan opened 4 months ago
@thiendangvan
Hi, that token info that you have seen in the Portkey APP is called defaultToken
info, and will be shown even the balance is 0. But it is will not be included in our API response when balance is 0. You can refer to the NetworkControllerEntity.getNetworkInfo()
function for more information.
There's a few more issues involved in this problem. /api/app/user/assets/searchUserAssets
is an API that needs header verification, you can refer to the NetworkControllerEntity.realExecute()
function for more details.
@thiendangvan Hi, that token info that you have seen in the Portkey APP is called
defaultToken
info, and will be shown even the balance is 0. But it is will not be included in our API response when balance is 0. You can refer to theNetworkControllerEntity.getNetworkInfo()
function for more information. There's a few more issues involved in this problem./api/app/user/assets/searchUserAssets
is an API that needs header verification, you can refer to theNetworkControllerEntity.realExecute()
function for more details.
got it thanks @carbon-portkey, can I get the document about 2 func u mentioned? or are they in the SDK source code?
@thiendangvan Hi, that token info that you have seen in the Portkey APP is called
defaultToken
info, and will be shown even the balance is 0. But it is will not be included in our API response when balance is 0. You can refer to theNetworkControllerEntity.getNetworkInfo()
function for more information. There's a few more issues involved in this problem./api/app/user/assets/searchUserAssets
is an API that needs header verification, you can refer to theNetworkControllerEntity.realExecute()
function for more details.got it thanks @carbon-portkey, can I get the document about 2 func u mentioned? or are they in the SDK source code?
@thiendangvan Yes, it's in this repo, please search those keywords for result.
@thiendangvan Yes, it's in this repo, please search those keywords for result.
got it, thanks @carbon-portkey
hi @carbon-portkey, may i know how the openResultFromExternal
passes the params to the target screen? I'm trying to pass an email to the LoginPortkey component but i don't know how to get the params in this component
LoginPortkey
@thiendangvan hi, i think you can find the email
params from the SignInEntryPage
component if you want to open the PortkeyEntries.SIGN_IN_ENTRY
page.
Here is a screenshot of the code
hi @carbon-portkey, may i know how the
openResultFromExternal
passes the params to the target screen? I'm trying to pass an email to the LoginPortkey component but i don't know how to get the params in this component
Here is the code for page registration, you should find the correct registration component. PortkeyEntries.SIGN_IN_ENTRY
corresponds to the SignInEntryPage
component, not the LoginPortkey
component
LoginPortkey
@thiendangvan hi, i think you can find the
SignInEntryPage
component if you want to open thePortkeyEntries.SIGN_IN_ENTRY
page. Here is a screenshot of the code
@FrankFeng1116, i've tried but can't get the email from props of the SignInEntryPage, below is what i got
openResultFromExternal @thiendangvan hi, you can try using this code
login(): Promise<UnlockedWallet | null> { return new Promise((resolve, reject) => { this.openResultFromExternal<LoginResult>( PortkeyEntries.SIGN_IN_ENTRY, async res => { if (res) { resolve(res?.data?.walletInfo ?? null); } else { reject(new AccountError(1004)); } }, { params: { email: 'example@gmail.com' } }, ); }); }
openResultFromExternal @thiendangvan hi, you can try using this code
login(): Promise<UnlockedWallet | null> { return new Promise((resolve, reject) => { this.openResultFromExternal<LoginResult>( PortkeyEntries.SIGN_IN_ENTRY, async res => { if (res) { resolve(res?.data?.walletInfo ?? null); } else { reject(new AccountError(1004)); } }, { params: { email: 'example@gmail.com' } }, ); }); }
it work, thank you very much @FrankFeng1116
hi @FrankFeng1116 , @carbon-portkey i have some questions:
Hi, we need to show the list of tokens in our app, I've tried the
getAssetsInfo
API but get nothing. could u add an API to get tokens like below?API log