Skip to content

Commit

Permalink
Merge pull request #643 from TokenScript/feature/release-2.5.0
Browse files Browse the repository at this point in the history
updated version and changelog
  • Loading branch information
nicktaras authored Apr 12, 2023
2 parents 2a30ee4 + 5fbabeb commit a75792b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 35 deletions.
17 changes: 12 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
> Description
The patch release addresses compatibility issues with the es6 version of the build.
Feature release with fixes, added support through Wallet Connect V2, and use of signatures via Solana and Flow.

### Upgrade Steps

* Update NPM package to version 2.4.4-rc
* Update NPM package to version 2.5.0

### Breaking Changes

[none]

### New Features

[none]
* Tokens loaded event hook added
* Wallet Connect V2 IM token wallet support
* Added sign/verify for flow and solana

### Bug Fixes

* TS config update for ES6 compatibility issue found
* Sonar Cloud code quality updates
* Namespace prefix for off chain communication
* ES LINT update
* Ability to extend library classes
* Support for es5 browsers
* Disabled support of iOS Edge with Torus

### Performance Improvements

Expand All @@ -28,4 +35,4 @@ The patch release addresses compatibility issues with the es6 version of the bui

**Full Change log**:

https://github.com/TokenScript/token-negotiator/compare/v2.4.3...v2.4.4
https://github.com/TokenScript/token-negotiator/compare/v2.4.3...v2.5.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tokenscript/token-negotiator",
"version": "2.4.4-rc",
"version": "2.5.0",
"description": "Token-negotiator a token attestation bridge between web 2.0 and 3.0.",
"module": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
14 changes: 2 additions & 12 deletions src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,7 @@ export const readTokens = (itemStorageKey: string) => {
return output
}

export const decodeTokens = (
rawTokens: string,
tokenParser: any,
unsignedTokenDataName: string,
includeSignedToken = false,
) => {
export const decodeTokens = (rawTokens: string, tokenParser: any, unsignedTokenDataName: string, includeSignedToken = false) => {
const x = JSON.parse(rawTokens)

if (x.length) {
Expand All @@ -93,12 +88,7 @@ export const decodeTokens = (
}
}

export const decodeToken = (
tokenData: OffChainTokenData,
tokenParser: any,
unsignedTokenDataName: string,
includeSignedToken = false,
) => {
export const decodeToken = (tokenData: OffChainTokenData, tokenParser: any, unsignedTokenDataName: string, includeSignedToken = false) => {
if (tokenData.token) {
let decodedToken = new tokenParser(base64ToUint8array(tokenData.token).buffer)

Expand Down
18 changes: 2 additions & 16 deletions src/outlet/localOutlet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ export class LocalOutlet {

if (!storageTokens) return []

const decodedTokens = decodeTokens(
storageTokens,
this.tokenConfig.tokenParser,
this.tokenConfig.unsignedTokenDataName,
true,
)
const decodedTokens = decodeTokens(storageTokens, this.tokenConfig.tokenParser, this.tokenConfig.unsignedTokenDataName, true)

return filterTokens(decodedTokens, this.tokenConfig.filter)
}
Expand All @@ -34,16 +29,7 @@ export class LocalOutlet {
// check if token issuer
let tokenObj = await rawTokenCheck(unsignedToken, this.tokenConfig)

let authHandler = new AuthHandler(
null,
null,
this.tokenConfig,
tokenObj,
address,
wallet,
redirectMode,
unsignedToken,
)
let authHandler = new AuthHandler(null, null, this.tokenConfig, tokenObj, address, wallet, redirectMode, unsignedToken)

return await authHandler.authenticate()
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// modified by build process.
export const VERSION = '2.4.4-rc'
export const VERSION = '2.5.0'

0 comments on commit a75792b

Please sign in to comment.