Skip to content

Commit

Permalink
impr(webapp): adding appName to signatureRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
AndlerRL committed Apr 16, 2024
1 parent d20107d commit 97ae083
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions apps/webapp/lib/eos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const esrOptions: SigningRequestEncodingOptions = {
export async function genLoginSigningRequest(
uuid: string = crypto.randomUUID()
) {
const req = createSigntureRequest({
const req = createSignatureRequest({
action: {
account: smartsaleEnv.test.bitcash.accounts,
name: 'login',
Expand All @@ -37,7 +37,8 @@ export async function genLoginSigningRequest(
}
},
info: {
uuid
uuid,
appName: 'Bitlauncher',
}
})
return req
Expand All @@ -47,7 +48,7 @@ export async function genBitusdDepositSigningRequest(
amount: number,
address: string
) {
const req = createSigntureRequest({
const req = createSignatureRequest({
action: {
account: 'bkbbanktest3',
name: 'stbtransfer',
Expand Down Expand Up @@ -75,7 +76,7 @@ export async function genUsdtDepositSigningRequest(
)?.address
if (!account) throw new Error('usdt account not found')

const req = createSigntureRequest({
const req = createSignatureRequest({
action: {
account,
name: 'transfer',
Expand All @@ -89,6 +90,7 @@ export async function genUsdtDepositSigningRequest(
},
info: {
uuid: crypto.randomUUID(),
appName: 'Bitlauncher',
edit: {
memo: false,
quantity: false
Expand All @@ -98,9 +100,10 @@ export async function genUsdtDepositSigningRequest(
return req
}

async function createSigntureRequest({
async function createSignatureRequest({
info = {
uuid: crypto.randomUUID()
uuid: crypto.randomUUID(),
appName: 'Bitlauncher'
},
action
}: Pick<SigningRequestCreateArguments, 'info' | 'action'>) {
Expand Down
2 changes: 1 addition & 1 deletion packages/smartsale-db/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import { PrismaClient } from "../prisma/client";

export const db = new PrismaClient({});

// 2033
// 2034

0 comments on commit 97ae083

Please sign in to comment.