Skip to content

Commit

Permalink
added get credit score function
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronk-bixly committed Aug 19, 2022
1 parent 7ddc388 commit ffc01ab
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@masa-finance/tools",
"version": "0.1.52",
"version": "0.1.53",
"license": "MIT",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
36 changes: 36 additions & 0 deletions src/common/rest/get-credit-score/index.ts
@@ -0,0 +1,36 @@
import { MethodMetadata, Parameter } from '..';

import { Headers } from '../../helpers/axios';
import { useMasaQuery } from '../../helpers/rest-calls';

const path = 'sbt/credit-score';

/* PAYLOAD
* {
* "userProfileId": "auth0|62bb24204dd722e042fb0803",
* "wallet": "0xeB76146E58F0224Accab28Cb9535C769723BE185"
* } */

export function useSimpleMethod({ body, settings }: any) {
const masaQuery = useMasaQuery(
'get-credit-score',
{
headers: Headers,
body,
metadata,
},
settings
);
return masaQuery;
}

const parameters: Parameter[] = [];

export const metadata: MethodMetadata = {
author: 'Aaron Knott',
authorPicture: '',
description: 'Get the credit score of a user',
name: path,
method: 'GET',
parameters,
};
2 changes: 1 addition & 1 deletion src/common/rest/mint-credit-score/index.ts
Expand Up @@ -4,6 +4,7 @@ import { Headers } from '../../helpers/axios';
import { useMasaMutation, useRestCall } from '../../helpers/rest-calls';

const path = 'contracts/credit-score/mint';

export function useMethod({ body }: any) {
const { data, error, loading, getData } = useRestCall({
headers: Headers,
Expand All @@ -28,7 +29,6 @@ export function useSimpleMethod({ pathParameters, body, settings }: any) {
return masaQuery;
}


const parameters: Parameter[] = [
{
key: 1,
Expand Down

0 comments on commit ffc01ab

Please sign in to comment.