Skip to content

Commit

Permalink
fix(portal): release all (#1061)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimakorzhovnik authored Dec 14, 2023
1 parent f7fb6cd commit 7eb2a04
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/containers/portal/release/ActionBarRelease.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,22 @@ function ActionBarRelease({
const getRelease = useCallback(async () => {
try {
if (signer && signingClient && currentRelease) {
const { isNanoLedger, bech32Address: addressKeplr } =
await signer.keplr.getKey(CYBER.CHAIN_ID);

const msgs = [];

if (currentRelease.length > 0) {
currentRelease.forEach((item) => {
const { address } = item;
const msgObject = releaseMsg(address);
msgs.push(msgObject);
});
currentRelease
.slice(0, isNanoLedger ? 4 : currentRelease.length)
.forEach((item) => {
const { address } = item;
const msgObject = releaseMsg(address);
msgs.push(msgObject);
});
}

const [{ address: addressKeplr }] = await signer.getAccounts();

if (msgs.length > 0) {
const gasLimits = 400000 * msgs.length;
const executeResponseResult = await signingClient.executeArray(
addressKeplr,
CONTRACT_ADDRESS_GIFT,
Expand Down

0 comments on commit 7eb2a04

Please sign in to comment.