Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

Android: buildGetAcceptanceMechanismsRequest throws CommonInvalidParam4 Error #36

Closed
TheArhaam opened this issue Dec 24, 2020 · 2 comments

Comments

@TheArhaam
Copy link
Contributor

buildGetAcceptanceMechanismsRequest throws CommonInvalidParam4 , caused by Invalid pointer has been passed

IndySdkModule.java

@ReactMethod
    public void buildGetAcceptanceMechanismsRequest(String submitterDid, int timestamp, String version, Promise promise) {
        try {
            String request = Ledger.buildGetAcceptanceMechanismsRequest(submitterDid, timestamp, version).get();
            promise.resolve(request);
        } catch (Exception e) {
            IndySdkRejectResponse rejectResponse = new IndySdkRejectResponse(e);
            promise.reject(rejectResponse.getCode(), rejectResponse.toJson(), e);
        }
    }

index.js

async buildGetAcceptanceMechanismsRequest(submitterDid: Did, timestamp: number, version: string): Promise<string> {
    if (Platform.OS === 'ios') {
      throw new Error(`Unsupported operation! Platform: ${Platform.OS}`)
    }
    return JSON.parse(await IndySdk.buildGetAcceptanceMechanismsRequest(submitterDid, typeof timestamp == 'undefined' ? -1 : timestamp, typeof version == 'undefined' ? null : version))
  },
@jakubkoci
Copy link
Contributor

Is related to #33

@jakubkoci
Copy link
Contributor

I'm closing the issue in favor of hyperledger-archives/indy-sdk-react-native#10. This repository is being archived.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants