Skip to content

Commit 24e08ad

Browse files
committed
fund new mnc account
1 parent 8875a8d commit 24e08ad

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

test/Wallet/live/walletLive.man.test.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,46 @@ describe('walletLive test', () => {
191191
`)
192192
})
193193

194+
test('5z send a wallet payment from myCtx to second wallet', async () => {
195+
const tauriRootKey =
196+
'1363ef9b14531a52648e1e7e7f430a10ceda1df8d514a2a75d8404094f14a649'
197+
const tauriIdentityKey = PrivateKey.fromHex(tauriRootKey)
198+
.toPublicKey()
199+
.toString()
200+
201+
const r = await createWalletPaymentAction({
202+
toIdentityKey: tauriIdentityKey,
203+
outputSatoshis: 1000 * 1000,
204+
keyDeriver: myCtx.keyDeriver,
205+
wallet: myCtx.wallet,
206+
logResult: true
207+
})
208+
209+
const toCtx = await _tu.createTestWalletWithStorageClient({
210+
rootKeyHex: tauriRootKey,
211+
chain: env.chain
212+
})
213+
214+
const args: InternalizeActionArgs = {
215+
tx: Utils.toArray(r.atomicBEEF, 'hex'),
216+
outputs: [
217+
{
218+
outputIndex: r.vout,
219+
protocol: 'wallet payment',
220+
paymentRemittance: {
221+
derivationPrefix: r.derivationPrefix,
222+
derivationSuffix: r.derivationSuffix,
223+
senderIdentityKey: r.senderIdentityKey
224+
}
225+
}
226+
],
227+
description: 'from tone wallet'
228+
}
229+
230+
const rw = await toCtx.wallet.internalizeAction(args)
231+
expect(rw.accepted).toBe(true)
232+
})
233+
194234
test('6 send a wallet payment from myCtx to second wallet', async () => {
195235
const r = await createWalletPaymentAction({
196236
toIdentityKey: myIdentityKey2,

0 commit comments

Comments
 (0)