• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

safe-global / safe-client-gateway / 13174565148

06 Feb 2025 08:18AM UTC coverage: 90.961% (-0.002%) from 90.963%
13174565148

Pull #2322

github

iamacook
fix: compare time
Pull Request #2322: fix: add integration tests for user domain

2941 of 3550 branches covered (82.85%)

Branch coverage included in aggregate %.

0 of 8 new or added lines in 1 file covered. (0.0%)

2 existing lines in 1 file now uncovered.

9819 of 10478 relevant lines covered (93.71%)

513.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.71
/src/datasources/wallets/entities/wallets.entity.db.ts
1
import {
118✔
2
  Column,
3
  Entity,
4
  Unique,
5
  PrimaryGeneratedColumn,
6
  ManyToOne,
7
  JoinColumn,
8
} from 'typeorm';
9
import { z } from 'zod';
10
import { getAddress } from 'viem';
118✔
11
import { User } from '@/datasources/users/entities/users.entity.db';
118✔
12
import { WalletSchema } from '@/domain/wallets/entities/wallet.entity';
13

14
@Entity('wallets')
15
@Unique('UQ_wallet_address', ['address'])
16
export class Wallet implements z.infer<typeof WalletSchema> {
118✔
17
  @PrimaryGeneratedColumn({ primaryKeyConstraintName: 'PK_wallet_id' })
18
  id!: number;
118✔
19

20
  @ManyToOne(() => User, (user: User) => user.id, {
104✔
21
    onDelete: 'CASCADE',
22
    nullable: false,
23
  })
24
  @JoinColumn({
25
    name: 'user_id',
26
    foreignKeyConstraintName: 'FK_wallets_user_id',
27
  })
28
  user!: User;
118✔
29

30
  @Column({
31
    type: 'varchar',
32
    length: 42,
33
    transformer: {
34
      from(value: string): `0x${string}` {
35
        return getAddress(value);
98✔
36
      },
37
      to(value: string): `0x${string}` {
38
        return getAddress(value);
230✔
39
      },
40
    },
41
  })
42
  address!: `0x${string}`;
118✔
43

44
  @Column({
45
    type: 'timestamp with time zone',
UNCOV
46
    default: () => 'CURRENT_TIMESTAMP',
×
47
  })
48
  created_at!: Date;
118✔
49

50
  @Column({
51
    type: 'timestamp with time zone',
UNCOV
52
    default: () => 'CURRENT_TIMESTAMP',
×
53
  })
54
  updated_at!: Date;
118✔
55
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc