diff --git a/.gitignore b/.gitignore index d28db1d..8596bee 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ node_modules .idea dist release.tgz -.vscode/ \ No newline at end of file +.vscode/ +packed diff --git a/package.json b/package.json index 7b908ca..776bd8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "crypto-coin-kit", - "version": "0.2.27", + "version": "0.2.29", "description": "crypto coin kit for common coins", "main": "./dist/index.js", "scripts": { diff --git a/src/EOS/index.ts b/src/EOS/index.ts index 1f04979..bb4a554 100644 --- a/src/EOS/index.ts +++ b/src/EOS/index.ts @@ -219,7 +219,7 @@ export class EOS implements Coin { }; private getExpiration = (txHeader: Header) => { - const expireInSeconds = txHeader.expireInSeconds || 300; + const expireInSeconds = txHeader.expireInSeconds || 1800; return new Date(txHeader.time + expireInSeconds * 1000) .toISOString() .split('.')[0]; diff --git a/src/IOST/index.ts b/src/IOST/index.ts index aee5ffb..e8d2d75 100644 --- a/src/IOST/index.ts +++ b/src/IOST/index.ts @@ -100,7 +100,7 @@ export class IOST implements Coin { tx.amount_limit = [{token: '*', value: 'unlimited'}]; tx.publisher = from; tx.time = txData.timestamp * 1e6; - tx.expiration = tx.time + (txData.expiration || 300) * 1e9; + tx.expiration = tx.time + (txData.expiration || 1800) * 1e9; tx.delay = 0; const hash = tx._publish_hash(); return {tx, hash}; diff --git a/src/__tests__/coins/IOST.test.ts b/src/__tests__/coins/IOST.test.ts index 2e1bdb3..6c77753 100644 --- a/src/__tests__/coins/IOST.test.ts +++ b/src/__tests__/coins/IOST.test.ts @@ -11,6 +11,7 @@ const txData = { memo: '', amount: '1', timestamp: 1579152770678, + expiration: 300, }; describe('Coin.IOST', () => { diff --git a/tsconfig.dot.json b/tsconfig.dot.json index cfa497a..8a050e7 100644 --- a/tsconfig.dot.json +++ b/tsconfig.dot.json @@ -63,6 +63,6 @@ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ }, - "include": ["src/DOT"], + "include": ["src/DOT", "src/index.ts", "src/third-party-types/**/*"], "exclude": ["node_modules", "**/__tests__/*"] }