mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 04:05:52 +00:00
Remove deprecated functions from api.ts (aka client.ts) (#1534)
* Removed deprecated functions from client.ts * Renamed files to be camelCase * Created top-level utils folder and tied all sub-references to it * Grouped tests for those utils into their own section Co-authored-by: Nathan Nichols <natenichols@cox.net>
This commit is contained in:
committed by
Mayukha Vadari
parent
8e52854773
commit
da9feffada
26
test/utils/signPaymentChannelClaim.ts
Normal file
26
test/utils/signPaymentChannelClaim.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import {assertResultMatch} from '../testUtils'
|
||||
import responses from '../fixtures/responses'
|
||||
import signPaymentChannelClaim from '../../src/utils/signPaymentChannelClaim'
|
||||
|
||||
|
||||
|
||||
describe('signPaymentChannelClaim', function () {
|
||||
it('basic signature matches', () => {
|
||||
|
||||
const channel = "3E18C05AD40319B809520F1A136370C4075321B285217323396D6FD9EE1E9037"
|
||||
const amount = ".00001"
|
||||
const privateKey = 'ACCD3309DB14D1A4FC9B1DAE608031F4408C85C73EE05E035B7DC8B25840107A'
|
||||
|
||||
const result = signPaymentChannelClaim(
|
||||
channel,
|
||||
amount,
|
||||
privateKey
|
||||
)
|
||||
|
||||
assertResultMatch(
|
||||
result,
|
||||
responses.signPaymentChannelClaim,
|
||||
'signPaymentChannelClaim'
|
||||
)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user