Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
txwrapper
Commits
d63ce299
Commit
d63ce299
authored
Dec 02, 2019
by
Amaury Martiny
Browse files
Fix test
parent
83c1a880
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/decodeTx.spec.ts
View file @
d63ce299
...
...
@@ -2,7 +2,7 @@ import { balanceTransfer } from './balanceTransfer';
import
{
createSignedTx
}
from
'
./createSignedTx
'
;
import
{
createSigningPayload
}
from
'
./createSigningPayload
'
;
import
{
decodeTx
}
from
'
./decodeTx
'
;
import
{
signWithAlice
,
TEST_TX_INFO
}
from
'
./util/testUtil
'
;
import
{
metadataRpc
,
signWithAlice
,
TEST_TX_INFO
}
from
'
./util/testUtil
'
;
describe
(
'
decodeTx
'
,
()
=>
{
it
(
'
should work
'
,
async
done
=>
{
...
...
@@ -12,7 +12,7 @@ describe('decodeTx', () => {
const
tx
=
createSignedTx
(
unsigned
,
signature
);
const
txInfo
=
decodeTx
(
tx
,
unsigned
.
metadataRpc
);
const
txInfo
=
decodeTx
(
tx
,
metadataRpc
);
([
'
address
'
,
'
amount
'
,
'
nonce
'
,
'
tip
'
,
'
to
'
]
as
const
).
forEach
(
key
=>
expect
(
txInfo
[
key
]).
toBe
(
TEST_TX_INFO
[
key
])
...
...
src/util/testUtil.ts
View file @
d63ce299
...
...
@@ -6,6 +6,8 @@ import { cryptoWaitReady } from '@polkadot/util-crypto';
import
{
TxInfo
}
from
'
../balanceTransfer
'
;
export
{
metadataRpc
};
/**
* @ignore
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment