GoodDollar / GoodDAPP

GoodDollar.org Wallet is the simplest access point to Claim your daily G$. It Is based on web3 and React native web.
good-dapp.vercel.app
MIT License
102 stars 53 forks source link

[BUG] 'Invalid input' error during the FV flow #4121

Closed vldkhh closed 10 months ago

vldkhh commented 10 months ago

[BUG] 'Invalid input' error during the FV flow

Steps: 1) go to the dev wallet app 2) go through the FV flow ( you can use this route - AppNavigation/Dashboard/FaceVerificationIntro?from=Claim&route=Claim) 3) observe the result

Actual result: Something went wrong on our side screen is shown

Expected result: FV flow works as expected

Env: dev.gooddollar.org 2.25.0 // Google Chrome

Attachments: Private Zenhub Image

johnsmith-gooddollar commented 10 months ago

@vldkhh @L03TJ3 this is server error happens if some of the following data/params/payload fields absent:

 if (!user || !enrollmentIdentifier || !payload || !sessionId || !provider.isPayloadValid(payload)) {
      throw new Error('Invalid input')
    }
 const faceSnapshotFields = [
  'sessionId',
  'faceScan',
  'auditTrailImage',
  'lowQualityAuditTrailImage',
  'idScan',
  'idScanFrontImage',
  'idScanBackImage'
]

isPayloadValid(payload: any): boolean {
    return !faceSnapshotFields.some(field => !payload[field])
  }

So

L03TJ3 commented 10 months ago

@johnsmith-gooddollar yes was the last point got fixed on server side now

vldkhh commented 10 months ago

@sirpy @johnsmith-gooddollar @L03TJ3 retested, now it works