Skip to content

Commit

Permalink
feat(raiden): pass secret hash to raiden
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Ranna committed May 7, 2019
1 parent 37f543e commit 963abcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/raidenclient/RaidenClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,11 @@ class RaidenClient extends BaseClient {
if (!tokenAddress) {
throw(errors.TOKEN_ADDRESS_NOT_FOUND);
}
// TODO: Secret hash. Depending on sha256 <-> keccak256 problem:
// https://github.com/ExchangeUnion/xud/issues/870
const tokenPaymentResponse = await this.tokenPayment({
amount,
token_address: tokenAddress,
target_address: deal.destination!,
secret_hash: deal.rHash,
});
return tokenPaymentResponse.secret;

Expand Down
2 changes: 1 addition & 1 deletion lib/raidenclient/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ export type TokenPaymentRequest = {
token_address: string,
target_address: string,
amount: number,
secret_hash?: string,
secret_hash: string,
identifier?: number,
};

0 comments on commit 963abcc

Please sign in to comment.