Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
alexruzenhack committed Jul 12, 2023
1 parent cf95816 commit 5b82047
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 30 deletions.
6 changes: 5 additions & 1 deletion __tests__/p2sh/tx-proposal-new-token.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,11 @@ describe('create-token tx-proposal api', () => {
expect(response.body.txHex).toBeDefined();
const tx = hathorLib.helpersUtils.createTxFromHex(response.body.txHex, new hathorLib.Network('testnet'));
expect(tx.outputs.map(o => o.decodedScript.address.base58))
.toEqual(expect.arrayContaining([TestUtils.multisigAddresses[1], mintAuthorityAddress, meltAuthorityAddress]));
.toEqual(expect.arrayContaining([
TestUtils.multisigAddresses[1],
mintAuthorityAddress,
meltAuthorityAddress
]));
expect(tx.outputs).toHaveLength(4);
const authorityOutputs = tx.outputs.filter(o => TOKEN_DATA.isAuthorityToken(o.tokenData));
expect(authorityOutputs).toHaveLength(2);
Expand Down
57 changes: 28 additions & 29 deletions src/api-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1345,39 +1345,38 @@ const apiDoc = {
},
examples: {
data: {
amount: 100,
}
amount: 100,
}
}
}
}
},
responses: {
200: {
description: 'Mint tokens.',
content: {
'application/json': {
examples: {
error: {
summary: 'Insufficient amount of tokens',
value: { success: false, error: "Don't have enough HTR funds to mint this amount." }
},
success: {
summary: 'Success',
value: { success: true, txHex: '0001010203000016392ed330ed99ff0f74e4169a8d257fd1d07d3b38c4f8ecf21a78f10efa000016392ed330ed99ff0f74e4169a8d257fd1d07d3b38c4f8ecf21a78f10efa00006946304402201166baf8513c0bfd21edcb169a4df5645ca826b22b6ed22d13945628094a04c502204f382ef9e6b903397b2bcaaed5316b0bb54212037a30e5cda7a5cf4d785b8f332102a5c1b462ccdcd8b4bb2cf672e0672576420c3102ecbe74da15b2cf56cf49b4a5000016392ed330ed99ff0f74e4169a8d257fd1d07d3b38c4f8ecf21a78f10efa02006946304402201166baf8513c0bfd21edcb169a4df5645ca826b22b6ed22d13945628094a04c502204f382ef9e6b903397b2bcaaed5316b0bb54212037a30e5cda7a5cf4d785b8f332102a5c1b462ccdcd8b4bb2cf672e0672576420c3102ecbe74da15b2cf56cf49b4a5000001f1000017a91462d397b360118b99a8d35892366074fe16fa6f098700000001010017a91462d397b360118b99a8d35892366074fe16fa6f098700000001810017a91462d397b360118b99a8d35892366074fe16fa6f098740327a9b3baad50b649b5f1d0000000000' }
},
'wallet-not-ready': {
summary: 'Wallet is not ready yet',
value: { success: false, message: 'Wallet is not ready.', state: 1 }
},
'no-wallet-id': {
summary: 'No wallet id parameter',
value: { success: false, message: "Parameter 'wallet-id' is required." }
},
'invalid-wallet-id': {
summary: 'Wallet id parameter is invalid',
value: { success: false, message: 'Invalid wallet-id parameter.' }
},
}
},
responses: {
200: {
description: 'Mint tokens.',
content: {
'application/json': {
examples: {
error: {
summary: 'Insufficient amount of tokens',
value: { success: false, error: "Don't have enough HTR funds to mint this amount." }
},
success: {
summary: 'Success',
value: { success: true, txHex: '0001010203000016392ed330ed99ff0f74e4169a8d257fd1d07d3b38c4f8ecf21a78f10efa000016392ed330ed99ff0f74e4169a8d257fd1d07d3b38c4f8ecf21a78f10efa00006946304402201166baf8513c0bfd21edcb169a4df5645ca826b22b6ed22d13945628094a04c502204f382ef9e6b903397b2bcaaed5316b0bb54212037a30e5cda7a5cf4d785b8f332102a5c1b462ccdcd8b4bb2cf672e0672576420c3102ecbe74da15b2cf56cf49b4a5000016392ed330ed99ff0f74e4169a8d257fd1d07d3b38c4f8ecf21a78f10efa02006946304402201166baf8513c0bfd21edcb169a4df5645ca826b22b6ed22d13945628094a04c502204f382ef9e6b903397b2bcaaed5316b0bb54212037a30e5cda7a5cf4d785b8f332102a5c1b462ccdcd8b4bb2cf672e0672576420c3102ecbe74da15b2cf56cf49b4a5000001f1000017a91462d397b360118b99a8d35892366074fe16fa6f098700000001010017a91462d397b360118b99a8d35892366074fe16fa6f098700000001810017a91462d397b360118b99a8d35892366074fe16fa6f098740327a9b3baad50b649b5f1d0000000000' }
},
'wallet-not-ready': {
summary: 'Wallet is not ready yet',
value: { success: false, message: 'Wallet is not ready.', state: 1 }
},
'no-wallet-id': {
summary: 'No wallet id parameter',
value: { success: false, message: "Parameter 'wallet-id' is required." }
},
'invalid-wallet-id': {
summary: 'Wallet id parameter is invalid',
value: { success: false, message: 'Invalid wallet-id parameter.' }
},
},
},
Expand Down

0 comments on commit 5b82047

Please sign in to comment.