Skip to content

Commit 894a017

Browse files
authored
Releasing v2.0.4 #852
Releasing v2.0.4
2 parents 6ca1b3f + 1ae54ff commit 894a017

File tree

8 files changed

+49
-9
lines changed

8 files changed

+49
-9
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
44

55
The changelog format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
## 2.0.4 - 7-Mar-2023
8+
9+
Package | Version | Link
10+
---|---|---
11+
SDK Core| v2.0.4 | [symbol-sdk](https://www.npmjs.com/package/symbol-sdk)
12+
Catbuffer | v1.0.2 | [catbuffer-typescript](https://www.npmjs.com/package/catbuffer-typescript)
13+
Client Library | v1.0.3 | [symbol-openapi-typescript-fetch-client](https://www.npmjs.com/package/symbol-openapi-typescript-fetch-client)
14+
15+
- [Bug] Fix mosaic definition transaction from payload method.
16+
717
## 2.0.3 - 25-Oct-2022
818

919
Package | Version | Link

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ Then sit back and wait. There will probably be discussion about the pull request
8282
*CONTRIBUTING.md is based on [CONTRIBUTING-template.md](https://github.com/nayafia/contributing-template/blob/master/CONTRIBUTING-template.md)* , [elasticsearch/CONTRIBUTING](https://github.com/elastic/elasticsearch/blob/master/CONTRIBUTING.md) and [spark/CONTRIBUTING](https://github.com/apache/spark/blob/master/CONTRIBUTING.md)
8383

8484
[pull-request]: https://help.github.com/articles/about-pull-requests/
85-
[github-issues]: https://github.com/nemtech/symbol-sdk-typescript-javascript/issues
85+
[github-issues]: https://github.com/symbol/symbol-sdk-typescript-javascript/issues

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ The Symbol SDK for TypeScript / JavaScript allows you to develop web, mobile, an
1111

1212
## Important Notes
1313

14-
### _Catapult-Server_ Network Compatibility (catapult-server@0.10.0.8)
14+
### _Catapult-Server_ Network Compatibility (catapult-server@1.0.3.5)
1515

16-
Symbol network launched [catapult-client](https://github.com/symbol/catapult-client/releases/tag/v1.0.0.0), **it is recommended to use this package's 1.0.0 version and upwards for the Symbol public network**.
16+
Symbol network launched [catapult-client](https://github.com/symbol/symbol/releases), **it is recommended to use this package's 2.0.3 version and upwards for the Symbol public network**.
1717

1818
Find the complete release notes [here](CHANGELOG.md).
1919

@@ -58,8 +58,8 @@ Copyright (c) 2018-present NEM
5858
Licensed under the [Apache License 2.0](LICENSE)
5959

6060
[self]: https://github.com/symbol/symbol-sdk-typescript-javascript
61-
[docs]: http://docs.symbolplatform.com/getting-started/setup-workstation.html
61+
[docs]: https://docs.symbol.dev/getting-started/setup-workstation.html
6262
[issues]: https://github.com/symbol/symbol-sdk-typescript-javascript/issues
63-
[sdk-ref]: https://docs.symbolplatform.com/references/typescript-sdk.html
64-
[guidelines]: https://docs.symbolplatform.com/contribute/contributing.html#sdk
63+
[sdk-ref]: https://docs.symbol.dev/references/typescript-sdk.html
64+
[guidelines]: https://docs.symbol.dev/contribute/contributing.html#sdk
6565
[discord]: https://discord.com/invite/xymcity

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "symbol-sdk",
3-
"version": "2.0.3",
3+
"version": "2.0.4",
44
"description": "Reactive symbol sdk for typescript and javascript",
55
"scripts": {
66
"pretest": "npm run build",

src/model/mosaic/MosaicInfo.ts

+8
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,14 @@ export class MosaicInfo {
113113
return this.flags.restrictable;
114114
}
115115

116+
/**
117+
* Is revokable
118+
* @returns {boolean}
119+
*/
120+
public isRevokable(): boolean {
121+
return this.flags.revokable;
122+
}
123+
116124
/**
117125
* Generate buffer
118126
* @return {Uint8Array}

src/model/transaction/MosaicDefinitionTransaction.ts

+1
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export class MosaicDefinitionTransaction extends Transaction {
156156
builder.getFlags().indexOf(MosaicFlagsDto.SUPPLY_MUTABLE) > -1,
157157
builder.getFlags().indexOf(MosaicFlagsDto.TRANSFERABLE) > -1,
158158
builder.getFlags().indexOf(MosaicFlagsDto.RESTRICTABLE) > -1,
159+
builder.getFlags().indexOf(MosaicFlagsDto.REVOKABLE) > -1,
159160
),
160161
builder.getDivisibility(),
161162
new UInt64(builder.getDuration().blockDuration),

test/model/transaction/MosaicDefinitionTransaction.spec.ts

+21
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
import { expect } from 'chai';
18+
import { CreateTransactionFromPayload } from '../../../src';
1819
import { Convert } from '../../../src/core/format';
1920
import { Account } from '../../../src/model/account/Account';
2021
import { MosaicFlags } from '../../../src/model/mosaic/MosaicFlags';
@@ -199,4 +200,24 @@ describe('MosaicDefinitionTransaction', () => {
199200
Object.assign(tx, { signer: account.publicAccount });
200201
expect(tx.shouldNotifyAccount(account.address)).to.be.true;
201202
});
203+
204+
it('should set correctly revokable flag when generating transaction from payload', () => {
205+
const mosaicDefinitionTransaction = MosaicDefinitionTransaction.create(
206+
Deadline.create(epochAdjustment),
207+
MosaicNonce.createFromUint8Array(new Uint8Array([0xe6, 0xde, 0x84, 0xb8])),
208+
new MosaicId(UInt64.fromUint(1).toDTO()),
209+
MosaicFlags.create(false, false, false, true),
210+
3,
211+
UInt64.fromUint(0),
212+
TestNetworkType,
213+
);
214+
215+
const signedTransaction = mosaicDefinitionTransaction.signWith(account, generationHash);
216+
const recreatedTransaction = CreateTransactionFromPayload(signedTransaction.payload) as MosaicDefinitionTransaction;
217+
218+
expect(recreatedTransaction.flags.supplyMutable).to.be.equal(false);
219+
expect(recreatedTransaction.flags.transferable).to.be.equal(false);
220+
expect(recreatedTransaction.flags.restrictable).to.be.equal(false);
221+
expect(recreatedTransaction.flags.revokable).to.be.equal(true);
222+
});
202223
});

0 commit comments

Comments
 (0)