Skip to content

Commit

Permalink
Fix/signature (#126)
Browse files Browse the repository at this point in the history
* Updates README.md (#125)

* Updates README.md: Adds Caching section, Changes in signature type

* README.md updates

* README.md updates

* fix(app/worker): add signature field to req body

* update(app): revert readme

* fix(app/register-address): fix test

---------

Co-authored-by: macnablocky <[email protected]>
Co-authored-by: Kacper Koza <[email protected]>
  • Loading branch information
3 people authored Jun 18, 2024
1 parent 4d4dd92 commit 8bf14e8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/apps/human-app/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ the exchange oracle URL as well as responses from the following endpoints:
* `/h-captcha/user-stats`
* `/oracles`
* `/statistics/stats`
* `/statistics/stats/assignment`
* `/statistics/stats/assignment`
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,23 @@ export class RegisterAddressDto {
@IsString()
@ApiProperty({ example: 'string' })
address: string;
@AutoMap()
@IsString()
@ApiProperty({ example: 'string' })
signature: string;
}
export class RegisterAddressCommand {
@AutoMap()
address: string;
@AutoMap()
signature: string;
token: string;
}
export class RegisterAddressData {
@AutoMap()
address: string;
@AutoMap()
signature: string;
}
export class RegisterAddressResponse {
signed_address: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import { HttpService } from '@nestjs/axios';
import { RegisterAddressController } from '../register-address.controller';
import { RegisterAddressService } from '../register-address.service';
import { registerAddressServiceMock } from './register-address.service.mock';
import { RegisterAddressProfile } from '../register-address-profile.service';
import {
REGISTER_ADDRESS_TOKEN,
registerAddressCommandFixture,
registerAddressDtoFixture,
registerAddressResponseFixture,
} from './register-address.fixtures';
import { RegisterAddressProfile } from '../register-address.mapper.profile';

describe('RegisterAddressController', () => {
let controller: RegisterAddressController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ import {
RegisterAddressResponse,
} from '../model/register-address.model';
const ADDRESS = '0xsome_address';
const SIGNATURE = '0xsome_signature';
export const REGISTER_ADDRESS_TOKEN = 'my_access_token';
const RESPONSE_ADDRESS = 'signed_address_response';
export const registerAddressDtoFixture: RegisterAddressDto = {
address: ADDRESS,
signature: SIGNATURE,
};
export const registerAddressCommandFixture: RegisterAddressCommand = {
address: ADDRESS,
token: REGISTER_ADDRESS_TOKEN,
signature: SIGNATURE,
};
export const registerAddressDataFixture: RegisterAddressData = {
address: ADDRESS,
signature: SIGNATURE,
};
export const registerAddressResponseFixture: RegisterAddressResponse = {
signed_address: RESPONSE_ADDRESS,
Expand Down

0 comments on commit 8bf14e8

Please sign in to comment.