Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/cd-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
- uses: actions/checkout@v5
with:
token: ${{ secrets.GH_GITBOOK_TOKEN }}
- name: Setup git identity
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cd-python-sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
- uses: actions/checkout@v5
with:
token: ${{ secrets.GH_GITBOOK_TOKEN }}
- name: Setup git identity
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
Expand Down Expand Up @@ -57,4 +61,4 @@ jobs:
exit 0
fi
git tag -a "$TAG" -m "Python SDK $VERSION"
git push origin "$TAG"
git push origin --tags
Original file line number Diff line number Diff line change
@@ -1,67 +1,76 @@
import { Expose, Transform } from 'class-transformer';
import { IsNumber, IsOptional, IsString } from 'class-validator';
import { Expose, Transform, Type } from 'class-transformer';
import { ApiProperty } from '@nestjs/swagger';

export interface InternalTransaction {
export class InternalTransaction {
@ApiProperty()
@Expose()
from: string;
@ApiProperty()
@Expose()
to: string;
@ApiProperty()
@Transform(({ value }) => value.toString())
@Expose()
value: string;
@ApiProperty()
@Expose()
method: string;
receiver?: string;
escrow?: string;
token?: string;
@ApiProperty()
@Expose()
receiver: string | null;
@ApiProperty()
@Expose()
escrow: string | null;
@ApiProperty()
@Expose()
token: string | null;
}

export class TransactionPaginationDto {
@ApiProperty({
example:
'0x020efc94ef6d9d7aa9a4886cc9e1659f4f2b63557133c29d51f387bcb0c4afd7',
})
@IsString()
@Expose()
public txHash: string;
txHash: string;

@ApiProperty({ example: 'Transfer' })
@IsString()
@ApiProperty({ example: 'bulkTransfer' })
@Expose()
public method: string;
method: string;

@ApiProperty({ example: '0xad1F7e45D83624A0c628F1B03477c6E129EddB78' })
@IsString()
@Expose()
public from: string;
from: string;

@ApiProperty({ example: '0xad1F7e45D83624A0c628F1B03477c6E129EddB78' })
@IsString()
@Expose()
public to: string;
to: string;

@ApiProperty({ example: '0xad1F7e45D83624A0c628F1B03477c6E129EddB78' })
@IsOptional()
@IsString()
@ApiProperty({
example: '0xad1F7e45D83624A0c628F1B03477c6E129EddB78',
})
@Expose()
public receiver?: string;
receiver: string | null;

@ApiProperty({ example: 12345 })
@Transform(({ value }) => Number(value))
@IsNumber()
@Expose()
public block: number;
block: number;

@ApiProperty({ example: '0.123' })
@Transform(({ value, obj }) => {
return obj.currentAddress.toLowerCase() === obj.from.toLowerCase()
? `-${value.toString()}`
: value.toString();
})
@IsString()
@Expose()
public value: string;
value: string;

@ApiProperty({
type: [Object],
description: 'List of transfers associated with the transaction',
})
@Type(() => InternalTransaction)
@Expose()
public internalTransactions: InternalTransaction[];
internalTransactions: InternalTransaction[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ export class StatsService implements OnModuleInit {

dailyData[dailyCacheKey].totalTransactionAmount = (
BigInt(dailyData[dailyCacheKey].totalTransactionAmount) +
BigInt(record.totalTransactionAmount)
record.totalTransactionAmount
).toString();
dailyData[dailyCacheKey].totalTransactionCount +=
record.totalTransactionCount;
Expand All @@ -346,7 +346,7 @@ export class StatsService implements OnModuleInit {

monthlyData[month].totalTransactionAmount = (
BigInt(monthlyData[month].totalTransactionAmount) +
BigInt(record.totalTransactionAmount)
record.totalTransactionAmount
).toString();
monthlyData[month].totalTransactionCount +=
record.totalTransactionCount;
Expand Down
8 changes: 7 additions & 1 deletion packages/apps/human-app/frontend/serve.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"public": "dist",
"symlinks": true,
"symlinks": false,
"trailingSlash": false,
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [
{
"source": "**/*.html",
Expand Down
8 changes: 7 additions & 1 deletion packages/apps/job-launcher/client/serve.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"public": "dist",
"symlinks": true,
"symlinks": false,
"trailingSlash": false,
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [
{
"source": "**/*.html",
Expand Down
8 changes: 7 additions & 1 deletion packages/apps/staking/serve.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
{
"public": "dist",
"symlinks": true,
"symlinks": false,
"trailingSlash": false,
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
],
"headers": [
{
"source": "**/*.html",
Expand Down
2 changes: 1 addition & 1 deletion scripts/tag-published-packages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function maybeCreateGitTagForPackage({ name, version }) {
childProcess.execSync(`git rev-parse --verify ${tag}`, { stdio: "ignore" });
console.warn(`Git tag already exists, skipping: ${tag}`);
} catch {
childProcess.execSync(`git tag ${tag}`);
childProcess.execSync(`git tag -a "${tag}" -m "Released JS package: @human-protocol/${name} - ${version}"`);
console.log(`Created tag: ${tag}`);
}
}
Expand Down
Loading