AstarNetwork / astar.js

Astar network Typescript SDK
Apache License 2.0
31 stars 9 forks source link

stakerPendingReward Weird Value Issue On Shibuya Testnet. #49

Closed johnnyji-dev closed 11 months ago

johnnyji-dev commented 1 year ago

Describe the bug A clear and concise description of what the bug is. I just created wallet address and requested pending reward value by using "estimatePendingRewards" from '@astar-network/astar-sdk-core'. I have not been staking before. So weird point that I expected the pending reward obviously 0. But I returned 3 on shibuya testnet. Also I can't retrieve any other information on "shibuya.subscan.io".

The wallet address is "bdxjY4YMr5smwB5hc4k6zZAEnFGCak39AcZCZ8e4eY4B4Am". const estimatedReward = await estimatePendingRewards({ api: this.client, // shibuya endpoint walletAddress: "bdxjY4YMr5smwB5hc4k6zZAEnFGCak39AcZCZ8e4eY4B4Am" }) return estimatedReward;

Why does it happened? Can it be fixed? Or Is it Okay on mainnet? Thx~

impelcrypto commented 1 year ago

Hi @johnnyji-dev It seems that the address of 'bdxjY4YMr5smwB5hc4k6zZAEnFGCak39AcZCZ8e4eY4B4Am' has eras you haven't claimed yet. Perhaps you withdrew it before claiming rewards.

image
johnnyji-dev commented 1 year ago

@impelcrypto How can you get staking history? That walllet address didn't have any transaction history on below shibuya.subscan.io. https://shibuya.subscan.io/account/bdxjY4YMr5smwB5hc4k6zZAEnFGCak39AcZCZ8e4eY4B4Am

Obivously, I think that I just created wallet by polkadot.js lib and than did no action on this wallet.

I also tried to retrieve same action but in my case have no data. image

impelcrypto commented 1 year ago

@johnnyji-dev It seems that Polkadot.js occur an error for this as If I input the exact address, but also specify the smart contract address, I got an empty value (no stakes). Perhaps you can try creating new account and see the result. Thanks.

image

johnnyji-dev commented 1 year ago

@johnnyji-dev It seems that Polkadot.js occur an error for this as If I input the exact address, but also specify the smart contract address, I got an empty value (no stakes). Perhaps you can try creating new account and see the result. Thanks.

image

I tried more.

image

===

image

===

image

impelcrypto commented 1 year ago

Yes, and you can try with creating new accounts