Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove default value for allowed issuers #54

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions test/utils/pack-utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Web3 from 'web3';
import { DID } from '@iden3/js-iden3-core';

export function packV2ValidatorParams(query: any, allowedIssuers: any[] = []) {
export function packV2ValidatorParams(query: any, allowedIssuers: any[]) {
const web3 = new Web3(Web3.givenProvider || 'ws://localhost:8545');
return web3.eth.abi.encodeParameter(
{
Expand Down Expand Up @@ -32,7 +33,7 @@ export function packV2ValidatorParams(query: any, allowedIssuers: any[] = []) {
);
}

export function packV3ValidatorParams(query: any, allowedIssuers: any[] = []) {
export function packV3ValidatorParams(query: any, allowedIssuers: any[]) {
const web3 = new Web3(Web3.givenProvider || 'ws://localhost:8545');
return web3.eth.abi.encodeParameter(
{
Expand Down Expand Up @@ -114,3 +115,7 @@ export function unpackV2ValidatorParams(hex: string) {
hex
);
}

export function didToString(did: string): string {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change usage / name didToIdString

return DID.idFromDID(DID.parse(did)).bigInt().toString();
}