Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Added SqlCallBackResponse interface, gave checkAllResponses the SqlCa…
Browse files Browse the repository at this point in the history
…llBackResponse[] Type
  • Loading branch information
eliasnemr committed Jul 22, 2021
1 parent 3f393f0 commit bedfbd3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minima",
"version": "0.96.21",
"version": "0.96.24",
"description": "Access the Minima blockchain",
"main": "dist/minima.js",
"scripts": {
Expand Down
24 changes: 22 additions & 2 deletions src/minima.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ export interface MMRProof {
inblock: string;
prevstate: [];
}
export interface PublicKey {
bits: number;
uses: string;
allowed: string;
publickey: string;
}
interface SignatureWitnessProof {
data: string;
hashbits: number;
Expand Down Expand Up @@ -224,7 +230,21 @@ interface CallBackResponse {
message: string
minifunc: string
}

export interface SqlResponse {
count: number;
results: boolean;
rows: any[];
sql: string;
status: boolean;
}
export interface SqlCallBackResponse {
db: string;
status: boolean;
sql: string;
response?: SqlResponse;
message: string;
minifunc: string;
}
interface State {
port: string
data: string
Expand Down Expand Up @@ -597,7 +617,7 @@ const Minima = {
return "0";
},

checkAllResponses : function (responses: CallBackResponse[]): boolean {
checkAllResponses : function (responses: CallBackResponse[] | SqlCallBackResponse[]): boolean {
const len = responses.length;
for(let i=0;i<len;i++) {
if (responses[i].status != true) {
Expand Down

0 comments on commit bedfbd3

Please sign in to comment.