Skip to content

Little Clarrification #716

Closed as not planned
Closed as not planned
@oasin

Description

@oasin

I am doing a workaround on the library, I am having some difficulties understanding the below lines

app(RegulatorServiceInterface::class)->sync($this, $balance);

This is found in the refreshBalance method of the Wallet class, I looked up the called method in the regulator service the below code is found in the sync method

    $this->persist($wallet);
    return $this->storageService->sync(
        $wallet->uuid,
        $this->mathService->round(
            $this->mathService->negative($this->mathService->sub($this->amount($wallet), $value))
        )
    );

I believe this synchronizes the Transactions Table and update the wallet.

I am trying to replicate this by synchronizing another table and updating the wallet table but it seems not to work.

I would appreciate your time for some clarification, thanks.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions