Skip to content

Commit

Permalink
Updating credit score usage
Browse files Browse the repository at this point in the history
  • Loading branch information
hide-on-bush-x committed Dec 7, 2022
1 parent 7a9dab7 commit 9fb8ed9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/credit-score/create.ts
Expand Up @@ -19,7 +19,7 @@ export const createCreditScore = async (
return result;
}

const msg = Templates.creditScoreTemplate(identityId.toString(), address);
const msg = Templates.creditScoreTemplate(identityId.toString(), new Date().toISOString(), address);

console.log(`Signer Address: '${address}'`);
console.log(`Signing: \n'${msg}'\n`);
Expand Down
10 changes: 1 addition & 9 deletions src/utils/templates.ts
Expand Up @@ -20,7 +20,7 @@ Challenge: ${challenge}`,
* @param lastUpdated The date of the credit score generation process
* @param wallet The address of the wallet used in the credit score generation process
*/
creditScoreTemplate: (value: string, lastUpdated: string, wallet: string) =>
creditScoreTemplate: (value: string, lastUpdated: string, wallet: string) =>
`${value};${lastUpdated};${wallet}`,

/**
Expand All @@ -32,12 +32,4 @@ Challenge: ${challenge}`,
twoFATemplate: (identityId: string, phoneNumber: string, code: string) =>
`Identity: ${identityId} Phone Number: ${phoneNumber} Code: ${code}`,

/**
* The Masa Finance Credit Score Template used for creating credit score tokens
* @param value The value of the credit score
* @param lastUpdated The date of the credit score generation process
* @param wallet The address of the wallet used in the credit score generation process
*/
sssbtCreditScoreTemplate: (value: string, lastUpdated: string, wallet: string) =>
`${value};${lastUpdated};${wallet}`,
};

0 comments on commit 9fb8ed9

Please sign in to comment.