Skip to content

Commit

Permalink
fix: add ERC777 support to getHash (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
bertux committed May 3, 2022
1 parent 841f075 commit 9c51703
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/currency/src/getHash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { RequestLogicTypes } from '@requestnetwork/types';
import Utils from '@requestnetwork/utils';

export const getHash = (curr: RequestLogicTypes.ICurrency): string => {
return curr.type === RequestLogicTypes.CURRENCY.ERC20
return curr.type === RequestLogicTypes.CURRENCY.ERC20 ||
curr.type === RequestLogicTypes.CURRENCY.ERC777
? curr.value
: Utils.crypto.last20bytesOfNormalizedKeccak256Hash({
type: curr.type,
Expand Down

0 comments on commit 9c51703

Please sign in to comment.