Skip to content

Commit

Permalink
Merge pull request #131 from CoboVault/dot
Browse files Browse the repository at this point in the history
update bundle config and enlarge EOS/IOST expiration time
  • Loading branch information
soralit authored Sep 10, 2020
2 parents 3f58e92 + 0718d5f commit cd9ecdb
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
.idea
dist
release.tgz
.vscode/
.vscode/
packed
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/EOS/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion src/IOST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/coins/IOST.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const txData = {
memo: '',
amount: '1',
timestamp: 1579152770678,
expiration: 300,
};

describe('Coin.IOST', () => {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.dot.json
Original file line number Diff line number Diff line change
Expand Up @@ -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__/*"]
}

0 comments on commit cd9ecdb

Please sign in to comment.