Skip to content

Commit

Permalink
Merge branch 'release/v1.23.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
algolucky committed Nov 10, 2022
2 parents 8504afd + 87f8cec commit c8d1d0a
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 20 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# v1.23.2

## What's Changed

### Bugfixes

- SDK: Dryrun and transaction decoding fix for boxes by @jasonpaulos in https://github.com/algorand/js-algorand-sdk/pull/690

**Full Changelog**: https://github.com/algorand/js-algorand-sdk/compare/v1.23.1...v1.23.2

# v1.23.1

### Bugfixes
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Include a minified browser bundle directly in your HTML like so:

```html
<script
src="https://unpkg.com/algosdk@v1.22.0/dist/browser/algosdk.min.js"
integrity="sha384-yEGXwnKn3JOtQMo5eTDgi7YeYt0O8uemu2f52V60pJcLsZf7vIKVyDjRfaK6gf1G"
src="https://unpkg.com/algosdk@v1.23.2/dist/browser/algosdk.min.js"
integrity="sha384-1gIB0FiLMNmJ7adAfBOdH20Mnw0DZarB9D3PTozUAhKn/uT9CpHdaSbBIpmZTgrU"
crossorigin="anonymous"
></script>
```
Expand All @@ -32,8 +32,8 @@ or

```html
<script
src="https://cdn.jsdelivr.net/npm/algosdk@v1.22.0/dist/browser/algosdk.min.js"
integrity="sha384-yEGXwnKn3JOtQMo5eTDgi7YeYt0O8uemu2f52V60pJcLsZf7vIKVyDjRfaK6gf1G"
src="https://cdn.jsdelivr.net/npm/algosdk@v1.23.2/dist/browser/algosdk.min.js"
integrity="sha384-1gIB0FiLMNmJ7adAfBOdH20Mnw0DZarB9D3PTozUAhKn/uT9CpHdaSbBIpmZTgrU"
crossorigin="anonymous"
></script>
```
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "algosdk",
"version": "1.23.1",
"version": "1.23.2",
"description": "The official JavaScript SDK for Algorand",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/dryrun.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ class DryrunTraceLine {
class DryrunTrace {
trace: DryrunTraceLine[] = [];
constructor(t: DryrunTraceLineResponse[]) {
if (t === undefined) return;
if (t == null) return;
this.trace = t.map((line) => new DryrunTraceLine(line));
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1086,11 +1086,11 @@ export class Transaction implements TransactionStorageStructure {
}
if (txnForEnc.apbx !== undefined) {
txn.boxes = txnForEnc.apbx.map((box) => ({
// Translate foreign app index to app ID
appIndex:
box.i === 0 || box.i === txn.appIndex
? txn.appIndex
: txn.appForeignApps[box.i - 1],
// We return 0 for the app ID so that it's guaranteed translateBoxReferences will
// translate the app index back to 0. If we instead returned the called app ID,
// translateBoxReferences would translate the app index to a nonzero value if the called
// app is also in the foreign app array.
appIndex: box.i ? txn.appForeignApps[box.i - 1] : 0,
name: box.n,
}));
}
Expand Down
14 changes: 7 additions & 7 deletions tests/cucumber/steps/steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ module.exports = function getSteps(options) {
case 'b64':
return makeUint8Array(Buffer.from(subArg[1], 'base64'));
default:
throw Error(`did not recognize app arg of type${subArg[0]}`);
throw Error(`did not recognize app arg of type ${subArg[0]}`);
}
}

Expand All @@ -158,7 +158,7 @@ module.exports = function getSteps(options) {
splitArgs.forEach((subArg) => {
subArgs.push(subArg.split(':'));
});
const appArgs = [];
const appArgs = makeArray();
subArgs.forEach((subArg) => {
appArgs.push(processAppArgs(subArg));
});
Expand All @@ -167,10 +167,10 @@ module.exports = function getSteps(options) {

function splitAndProcessBoxReferences(boxRefs) {
if (boxRefs == null || boxRefs === '') {
return [];
return makeArray();
}
const splitRefs = boxRefs.split(',');
const boxRefArray = [];
const boxRefArray = makeArray();
let appIndex = 0;

for (let i = 0; i < splitRefs.length; i++) {
Expand Down Expand Up @@ -3157,7 +3157,7 @@ module.exports = function getSteps(options) {
// split and process foreign apps
let foreignApps;
if (foreignAppsCommaSeparatedString !== '') {
foreignApps = [];
foreignApps = makeArray();
foreignAppsCommaSeparatedString
.split(',')
.forEach((foreignAppAsString) => {
Expand All @@ -3167,7 +3167,7 @@ module.exports = function getSteps(options) {
// split and process foreign assets
let foreignAssets;
if (foreignAssetsCommaSeparatedString !== '') {
foreignAssets = [];
foreignAssets = makeArray();
foreignAssetsCommaSeparatedString
.split(',')
.forEach((foreignAssetAsString) => {
Expand All @@ -3177,7 +3177,7 @@ module.exports = function getSteps(options) {
// split and process app accounts
let appAccounts;
if (appAccountsCommaSeparatedString !== '') {
appAccounts = appAccountsCommaSeparatedString.split(',');
appAccounts = makeArray(...appAccountsCommaSeparatedString.split(','));
}
// split and process box references
let boxes;
Expand Down

0 comments on commit c8d1d0a

Please sign in to comment.