Skip to content
Snippets Groups Projects
Commit 5eaf77b1 authored by Hugo Trentesaux's avatar Hugo Trentesaux
Browse files

fix wrong tx direction (oups)

parent fff5f698
No related branches found
No related tags found
No related merge requests found
...@@ -117,8 +117,8 @@ type ItemsCounter @entity { ...@@ -117,8 +117,8 @@ type ItemsCounter @entity {
type Account @entity { type Account @entity {
"Account address is SS58 format" "Account address is SS58 format"
id: ID! id: ID!
transfersIssued: [Transfer!] @derivedFrom(field: "to") transfersIssued: [Transfer!] @derivedFrom(field: "from")
transfersReceived: [Transfer!] @derivedFrom(field: "from") transfersReceived: [Transfer!] @derivedFrom(field: "to")
identity: Identity @derivedFrom(field: "account") identity: Identity @derivedFrom(field: "account")
} }
......
...@@ -24,15 +24,15 @@ processor.run(new TypeormDatabaseWithCache(), async (ctx) => { ...@@ -24,15 +24,15 @@ processor.run(new TypeormDatabaseWithCache(), async (ctx) => {
if (header.height == 0) { if (header.height == 0) {
await saveGenesis(ctx); await saveGenesis(ctx);
} }
// save all extrinsics of the block (except Timestamp.Set when no UD) // save all extrinsics of the block
for (const extrinsic of extrinsics) { for (const extrinsic of extrinsics) {
await saveExtrinsic(ctx, extrinsic); await saveExtrinsic(ctx, extrinsic);
} }
// save all calls of the block (except Timestamp.Set when no UD) // save all calls of the block
for (const call of calls.reverse()) { for (const call of calls.reverse()) {
await saveCall(ctx, call); await saveCall(ctx, call);
} }
// save all events of the block (except System.ExtrinsicSuccess of Timestamp.Set) // save all events of the block
for (const event of events) { for (const event of events) {
await saveEvent(ctx, event); await saveEvent(ctx, event);
} }
......
...@@ -14,10 +14,10 @@ export class Account { ...@@ -14,10 +14,10 @@ export class Account {
@PrimaryColumn_() @PrimaryColumn_()
id!: string id!: string
@OneToMany_(() => Transfer, e => e.to) @OneToMany_(() => Transfer, e => e.from)
transfersIssued!: Transfer[] transfersIssued!: Transfer[]
@OneToMany_(() => Transfer, e => e.from) @OneToMany_(() => Transfer, e => e.to)
transfersReceived!: Transfer[] transfersReceived!: Transfer[]
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment