|
17 | 17 | import { expect } from 'chai'; |
18 | 18 | import { Account } from '../../../src/model/account/Account'; |
19 | 19 | import { Address } from '../../../src/model/account/Address'; |
20 | | -import { Recipient } from '../../../src/model/account/Recipient'; |
21 | 20 | import { NetworkType } from '../../../src/model/blockchain/NetworkType'; |
22 | 21 | import { NetworkCurrencyMosaic } from '../../../src/model/mosaic/NetworkCurrencyMosaic'; |
23 | 22 | import { NamespaceId } from '../../../src/model/namespace/NamespaceId'; |
@@ -108,63 +107,6 @@ describe('TransferTransaction', () => { |
108 | 107 | '44B262C46CEABB8500E1F50500000000'); |
109 | 108 | }); |
110 | 109 |
|
111 | | - it('should createComplete an TransferTransaction object with Recipient given address recipient', () => { |
112 | | - const addressRecipient = new Recipient(Address.createFromRawAddress('SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC')); |
113 | | - const transferTransaction = TransferTransaction.create( |
114 | | - Deadline.create(), |
115 | | - addressRecipient, |
116 | | - [ |
117 | | - NetworkCurrencyMosaic.createRelative(100), |
118 | | - ], |
119 | | - PlainMessage.create('test-message'), |
120 | | - NetworkType.MIJIN_TEST, |
121 | | - ); |
122 | | - |
123 | | - expect(transferTransaction.message.payload).to.be.equal('test-message'); |
124 | | - expect(transferTransaction.mosaics.length).to.be.equal(1); |
125 | | - expect(transferTransaction.recipient).to.be.instanceof(Recipient); |
126 | | - |
127 | | - const address = ((transferTransaction.recipient as Recipient).value as Address); |
128 | | - expect(address.plain()).to.be.equal('SBILTA367K2LX2FEXG5TFWAS7GEFYAGY7QLFBYKC'); |
129 | | - |
130 | | - const signedTransaction = transferTransaction.signWith(account); |
131 | | - |
132 | | - expect(signedTransaction.payload.substring( |
133 | | - 240, |
134 | | - signedTransaction.payload.length, |
135 | | - )).to.be.equal('9050B9837EFAB4BBE8A4B9BB32D812F9885C00D8FC1650E1420D000100746573742D6D657373616765' + |
136 | | - '44B262C46CEABB8500E1F50500000000'); |
137 | | - }); |
138 | | - |
139 | | - it('should createComplete an TransferTransaction object with Recipient given namespaceId recipient', () => { |
140 | | - const namespaceId = new NamespaceId('nem.owner'); |
141 | | - const namespaceRecipient = new Recipient(namespaceId); |
142 | | - const transferTransaction = TransferTransaction.create( |
143 | | - Deadline.create(), |
144 | | - namespaceRecipient, |
145 | | - [ |
146 | | - NetworkCurrencyMosaic.createRelative(100), |
147 | | - ], |
148 | | - PlainMessage.create('test-message'), |
149 | | - NetworkType.MIJIN_TEST, |
150 | | - ); |
151 | | - |
152 | | - expect(transferTransaction.message.payload).to.be.equal('test-message'); |
153 | | - expect(transferTransaction.mosaics.length).to.be.equal(1); |
154 | | - expect(transferTransaction.recipient).to.be.instanceof(Recipient); |
155 | | - |
156 | | - const actualNamespaceId = ((transferTransaction.recipient as Recipient).value as NamespaceId); |
157 | | - expect(actualNamespaceId.toHex()).to.be.equal(namespaceId.toHex()); |
158 | | - |
159 | | - const signedTransaction = transferTransaction.signWith(account); |
160 | | - |
161 | | - expect(signedTransaction.payload.substring( |
162 | | - 240, |
163 | | - signedTransaction.payload.length, |
164 | | - )).to.be.equal('9151776168D24257D8000000000000000000000000000000000D000100746573742D6D657373616765' + |
165 | | - '44B262C46CEABB8500E1F50500000000'); |
166 | | - }); |
167 | | - |
168 | 110 | it('should format TransferTransaction payload with 25 bytes binary address', () => { |
169 | 111 | const transferTransaction = TransferTransaction.create( |
170 | 112 | Deadline.create(), |
|
0 commit comments