Skip to content

Commit

Permalink
fix: earn rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Makedonski committed Jan 25, 2024
1 parent c624744 commit fb94413
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@nolus/nolusjs",
"author": "Nolabs",
"license": "Apache-2.0",
"version": "2.0.9",
"version": "2.0.10",
"description": "JS library for NodeJS and Web browsers to interact with the Nolus Protocol",
"engines": {
"node": ">=14.0.0"
Expand Down
10 changes: 5 additions & 5 deletions src/wallet/NolusWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,24 +295,24 @@ export class NolusWallet extends SigningCosmWasmClient {
});
}

try {
for(let lppContract of lppContracts){
for (let lppContract of lppContracts) {
try {
const item = await this.queryContractSmart(lppContract, getLenderRewardsMsg(this.address as string));
if (Number(item.rewards.amount) > 0) {
const msg = MsgExecuteContract.fromPartial({
sender: this.address,
contract: lppContract,
msg: toUtf8(JSON.stringify(claimRewardsMsg(this.address))),
});

msgs.push({
msg: msg,
msgTypeUrl: '/cosmwasm.wasm.v1.MsgExecuteContract',
});
}
} catch (error) {
console.log(error);
}
} catch (error) {
console.log(error);
}

return await this.simulateMultiTx(msgs, '');
Expand Down

0 comments on commit fb94413

Please sign in to comment.