Skip to content

Commit

Permalink
Merge branch 'main' into xalgo
Browse files Browse the repository at this point in the history
  • Loading branch information
gidonkatten authored Dec 24, 2024
2 parents a1301fc + d4072eb commit 3d0a2f3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @folks-finance/algorand-sdk

## 0.0.7

### Patch Changes

- [#69](https://github.com/Folks-Finance/algorand-js-sdk/pull/69) [`30119c7`](https://github.com/Folks-Finance/algorand-js-sdk/commit/30119c7857855fcfcacb52e2afa36c8bc85af442) Thanks [@gidonkatten](https://github.com/gidonkatten)! - return group transaction for register online

## 0.0.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@folks-finance/algorand-sdk",
"version": "0.0.6",
"version": "0.0.7",
"description": "The official JavaScript SDK for the Folks Finance Protocol",
"main": "dist/index.js",
"types": "dist/types/index.d.ts",
Expand Down
13 changes: 6 additions & 7 deletions src/algo-liquid-governance/v2/governance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ function prepareClaimPremintTransaction(

/**
*
* Returns a transaction to register escrow online.
* Returns a group transaction to register an escrow online.
*
* @param distributor - distributor that has escrow
* @param senderAddr - account address for the sender
Expand All @@ -405,7 +405,7 @@ function prepareClaimPremintTransaction(
* @param params - suggested params for the transactions with the fees overwritten
* @returns Transaction register online transaction
*/
function prepareRegisterEscrowOnlineTransaction(
function prepareRegisterEscrowOnlineTransactions(
distributor: Distributor,
senderAddr: string,
registerFeeAmount: number | bigint,
Expand All @@ -416,7 +416,7 @@ function prepareRegisterEscrowOnlineTransaction(
voteLastRound: number | bigint,
voteKeyDilution: number | bigint,
params: SuggestedParams,
): Transaction {
): Transaction[] {
const escrowAddr = getDistributorLogicSig(senderAddr).address();

// check register fee is either 0 ALGO or 0.2 ALGO
Expand Down Expand Up @@ -446,16 +446,15 @@ function prepareRegisterEscrowOnlineTransaction(
],
suggestedParams: { ...params, flatFee: true, fee: 3000 },
});
const txns = atc.buildGroup().map(({ txn }) => {
return atc.buildGroup().map(({ txn }) => {
txn.group = undefined;
return txn;
});
return txns[0];
}

/**
*
* Returns a transaction to register escrow offline.
* Returns a transaction to register an escrow offline.
*
* @param distributor - distributor that has escrow
* @param senderAddr - account address for the sender
Expand Down Expand Up @@ -622,7 +621,7 @@ export {
prepareUnmintPremintTransaction,
prepareUnmintTransactions,
prepareClaimPremintTransaction,
prepareRegisterEscrowOnlineTransaction,
prepareRegisterEscrowOnlineTransactions,
prepareRegisterEscrowOfflineTransaction,
prepareCommitOrVoteTransaction,
prepareRemoveLiquidGovernanceEscrowTransactions,
Expand Down

0 comments on commit 3d0a2f3

Please sign in to comment.