mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
* transaction editing: use txParams 'from' account * signature-request: use txParams 'from' account * signature-request-original: use txParams 'from' account * encryption/decryption: use txParams 'from' account * update tests * set 'send' state 'from' address in confirm containers
32 lines
906 B
JavaScript
32 lines
906 B
JavaScript
import React from 'react'
|
|
import assert from 'assert'
|
|
import shallow from '../../../../../lib/shallow-with-context'
|
|
import SignatureRequest from '../signature-request.component'
|
|
|
|
|
|
describe('Signature Request Component', function () {
|
|
describe('render', function () {
|
|
const fromAddress = '0x123456789abcdef'
|
|
it('should render a div with one child', function () {
|
|
const wrapper = shallow((
|
|
<SignatureRequest
|
|
clearConfirmTransaction={() => {}}
|
|
cancel={() => {}}
|
|
sign={() => {}}
|
|
txData={{
|
|
msgParams: {
|
|
data: '{"message": {"from": {"name": "hello"}}}',
|
|
from: fromAddress,
|
|
},
|
|
}}
|
|
fromAccount={{ address: fromAddress }}
|
|
/>
|
|
))
|
|
|
|
assert(wrapper.is('div'))
|
|
assert.equal(wrapper.length, 1)
|
|
assert(wrapper.hasClass('signature-request'))
|
|
})
|
|
})
|
|
})
|