simple_wallet 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38445,3 +38445,1255 @@ outcome = (
38445
38445
  SimpleWallet::Transaction::Debit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 1786], ["amount", -35], ["created_at", "2026-04-06 16:54:25.576427"], ["note", "My custom transaction note"], ["pre_account_balance", 100], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Debit"], ["updated_at", "2026-04-06 16:54:25.576427"]]
38446
38446
  TRANSACTION (0.0ms) ROLLBACK
38447
38447
  SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 1786], ["LIMIT", 1]]
38448
+ SQL (0.2ms) SET search_path TO public
38449
+  (65.4ms) DROP DATABASE IF EXISTS "simple_wallet_test"
38450
+  (21.9ms) CREATE DATABASE "simple_wallet_test" ENCODING = 'unicode'
38451
+ SQL (19.1ms) CREATE EXTENSION IF NOT EXISTS "plpgsql" SCHEMA pg_catalog
38452
+  (0.2ms) DROP TABLE IF EXISTS "simple_wallet_accounts" CASCADE
38453
+  (4.4ms) CREATE TABLE "simple_wallet_accounts" ("id" bigserial primary key, "balance" integer DEFAULT 0 NOT NULL, "created_at" timestamp(6) NOT NULL, "income" integer DEFAULT 0 NOT NULL, "outcome" integer DEFAULT 0 NOT NULL, "updated_at" timestamp(6) NOT NULL, CONSTRAINT simple_wallet_balance_positive_chk CHECK (balance >= 0), CONSTRAINT simple_wallet_income_positive_chk CHECK (income >= 0), CONSTRAINT simple_wallet_outcome_positive_chk CHECK (outcome <= 0))
38454
+  (0.1ms) DROP TABLE IF EXISTS "simple_wallet_transactions" CASCADE
38455
+  (2.4ms) CREATE TABLE "simple_wallet_transactions" ("id" bigserial primary key, "account_id" bigint NOT NULL, "amount" integer NOT NULL, "created_at" timestamp(6) NOT NULL, "note" text, "pre_account_balance" integer DEFAULT 0 NOT NULL, "source_id" bigint, "source_type" character varying, "type" character varying NOT NULL, "updated_at" timestamp(6) NOT NULL, CONSTRAINT simple_wallet_transaction_amount_chk CHECK (type::text = 'SimpleWallet::Transaction::Credit'::text AND amount >= 0 OR type::text = 'SimpleWallet::Transaction::Debit'::text AND amount <= 0))
38456
+  (0.7ms) CREATE INDEX "index_simple_wallet_transactions_on_account_id" ON "simple_wallet_transactions" ("account_id")
38457
+  (1.0ms) CREATE INDEX "index_simple_wallet_transactions_on_source" ON "simple_wallet_transactions" ("source_type", "source_id")
38458
+  (0.7ms) CREATE INDEX "index_simple_wallet_transactions_on_type" ON "simple_wallet_transactions" ("type")
38459
+  (2.0ms) ALTER TABLE "simple_wallet_transactions" ADD CONSTRAINT "fk_rails_2198601d7d"
38460
+ FOREIGN KEY ("account_id")
38461
+ REFERENCES "simple_wallet_accounts" ("id")
38462
+ 
38463
+  (1.4ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)
38464
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
38465
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES (20260329181402)
38466
+  (0.3ms) INSERT INTO "schema_migrations" (version) VALUES
38467
+ (20260329170901);
38468
+  (1.6ms) CREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL)
38469
+ ActiveRecord::InternalMetadata Load (0.6ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 [[nil, "environment"]]
38470
+ ActiveRecord::InternalMetadata Create (0.5ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('environment', 'test', '2026-04-11 16:52:11.356201', '2026-04-11 16:52:11.356203') RETURNING "key"
38471
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 [[nil, "environment"]]
38472
+ ActiveRecord::InternalMetadata Load (0.1ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 [[nil, "schema_sha1"]]
38473
+ ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', '3d3fb4aee80ad6fc3ec771d8e53cd6d4d3f49167', '2026-04-11 16:52:11.357744', '2026-04-11 16:52:11.357745') RETURNING "key"
38474
+ ActiveRecord::SchemaMigration Load (1.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
38475
+ TRANSACTION (0.2ms) BEGIN
38476
+ SimpleWallet::Account Create (1.0ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.519642"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.519642"]]
38477
+ TRANSACTION (0.6ms) COMMIT
38478
+ TRANSACTION (0.1ms) BEGIN
38479
+ SimpleWallet::Transaction::Credit Create (0.8ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 1], ["amount", 100], ["created_at", "2026-04-11 16:52:11.538227"], ["note", "Bonus!"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.538227"]]
38480
+ SimpleWallet::Account Update All (0.9ms) UPDATE "simple_wallet_accounts" SET balance = (
38481
+ SELECT COALESCE(SUM(amount), 0)
38482
+ FROM simple_wallet_transactions
38483
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38484
+ ),
38485
+ income = (
38486
+ SELECT COALESCE(SUM(amount), 0)
38487
+ FROM simple_wallet_transactions
38488
+ WHERE
38489
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38490
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38491
+ ),
38492
+ outcome = (
38493
+ SELECT COALESCE(SUM(amount), 0)
38494
+ FROM simple_wallet_transactions
38495
+ WHERE
38496
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38497
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38498
+ )
38499
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 1]]
38500
+ TRANSACTION (0.4ms) COMMIT
38501
+ SimpleWallet::Account Load (0.2ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
38502
+ TRANSACTION (0.1ms) BEGIN
38503
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.545970"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.545970"]]
38504
+ TRANSACTION (0.5ms) COMMIT
38505
+ TRANSACTION (0.1ms) BEGIN
38506
+ SimpleWallet::Transaction::Credit Create (0.4ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 2], ["amount", 1000000], ["created_at", "2026-04-11 16:52:11.547399"], ["note", "AI income"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.547399"]]
38507
+ SimpleWallet::Account Update All (0.4ms) UPDATE "simple_wallet_accounts" SET balance = (
38508
+ SELECT COALESCE(SUM(amount), 0)
38509
+ FROM simple_wallet_transactions
38510
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38511
+ ),
38512
+ income = (
38513
+ SELECT COALESCE(SUM(amount), 0)
38514
+ FROM simple_wallet_transactions
38515
+ WHERE
38516
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38517
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38518
+ ),
38519
+ outcome = (
38520
+ SELECT COALESCE(SUM(amount), 0)
38521
+ FROM simple_wallet_transactions
38522
+ WHERE
38523
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38524
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38525
+ )
38526
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 2]]
38527
+ TRANSACTION (0.5ms) COMMIT
38528
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 2], ["LIMIT", 1]]
38529
+ TRANSACTION (0.2ms) BEGIN
38530
+ SimpleWallet::Account Create (0.6ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.557142"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.557142"]]
38531
+ TRANSACTION (0.7ms) COMMIT
38532
+ TRANSACTION (0.1ms) BEGIN
38533
+ SimpleWallet::Account Create (0.3ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.560246"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.560246"]]
38534
+ TRANSACTION (0.5ms) COMMIT
38535
+ TRANSACTION (0.0ms) BEGIN
38536
+ SimpleWallet::Transaction::Credit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 4], ["amount", 100], ["created_at", "2026-04-11 16:52:11.561810"], ["note", "Bonus!"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.561810"]]
38537
+ SimpleWallet::Account Update All (0.5ms) UPDATE "simple_wallet_accounts" SET balance = (
38538
+ SELECT COALESCE(SUM(amount), 0)
38539
+ FROM simple_wallet_transactions
38540
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38541
+ ),
38542
+ income = (
38543
+ SELECT COALESCE(SUM(amount), 0)
38544
+ FROM simple_wallet_transactions
38545
+ WHERE
38546
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38547
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38548
+ ),
38549
+ outcome = (
38550
+ SELECT COALESCE(SUM(amount), 0)
38551
+ FROM simple_wallet_transactions
38552
+ WHERE
38553
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38554
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38555
+ )
38556
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 4]]
38557
+ TRANSACTION (0.3ms) COMMIT
38558
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 4], ["LIMIT", 1]]
38559
+ TRANSACTION (0.1ms) BEGIN
38560
+ SimpleWallet::Account Create (0.3ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.568358"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.568358"]]
38561
+ TRANSACTION (0.4ms) COMMIT
38562
+ TRANSACTION (0.1ms) BEGIN
38563
+ SimpleWallet::Transaction::Credit Create (0.5ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 5], ["amount", 100], ["created_at", "2026-04-11 16:52:11.570161"], ["note", "Bonus!"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.570161"]]
38564
+ TRANSACTION (0.4ms) COMMIT
38565
+ TRANSACTION (0.1ms) BEGIN
38566
+ SimpleWallet::Transaction::Credit Create (0.4ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 5], ["amount", 20], ["created_at", "2026-04-11 16:52:11.572151"], ["note", "Bonus!"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.572151"]]
38567
+ TRANSACTION (0.3ms) COMMIT
38568
+ TRANSACTION (0.1ms) BEGIN
38569
+ SimpleWallet::Transaction::Debit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 5], ["amount", -17], ["created_at", "2026-04-11 16:52:11.573786"], ["note", "Shopping..."], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Debit"], ["updated_at", "2026-04-11 16:52:11.573786"]]
38570
+ TRANSACTION (0.4ms) COMMIT
38571
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]]
38572
+ SimpleWallet::Account Update All (0.9ms) UPDATE "simple_wallet_accounts" SET balance = (
38573
+ SELECT COALESCE(SUM(amount), 0)
38574
+ FROM simple_wallet_transactions
38575
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38576
+ ),
38577
+ income = (
38578
+ SELECT COALESCE(SUM(amount), 0)
38579
+ FROM simple_wallet_transactions
38580
+ WHERE
38581
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38582
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38583
+ ),
38584
+ outcome = (
38585
+ SELECT COALESCE(SUM(amount), 0)
38586
+ FROM simple_wallet_transactions
38587
+ WHERE
38588
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38589
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38590
+ )
38591
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 5]]
38592
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 5], ["LIMIT", 1]]
38593
+ TRANSACTION (0.1ms) BEGIN
38594
+ SimpleWallet::Account Create (0.4ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.577157"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.577157"]]
38595
+ TRANSACTION (0.3ms) COMMIT
38596
+ TRANSACTION (0.1ms) BEGIN
38597
+ SimpleWallet::Account Create (0.3ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.578943"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.578943"]]
38598
+ TRANSACTION (0.3ms) COMMIT
38599
+ TRANSACTION (0.1ms) BEGIN
38600
+ SimpleWallet::Transaction::Credit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 7], ["amount", 1000000], ["created_at", "2026-04-11 16:52:11.580183"], ["note", "AI income"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.580183"]]
38601
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
38602
+ SELECT COALESCE(SUM(amount), 0)
38603
+ FROM simple_wallet_transactions
38604
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38605
+ ),
38606
+ income = (
38607
+ SELECT COALESCE(SUM(amount), 0)
38608
+ FROM simple_wallet_transactions
38609
+ WHERE
38610
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38611
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38612
+ ),
38613
+ outcome = (
38614
+ SELECT COALESCE(SUM(amount), 0)
38615
+ FROM simple_wallet_transactions
38616
+ WHERE
38617
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38618
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38619
+ )
38620
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 7]]
38621
+ TRANSACTION (0.3ms) COMMIT
38622
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 7], ["LIMIT", 1]]
38623
+ TRANSACTION (0.1ms) BEGIN
38624
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.582152"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.582152"]]
38625
+ TRANSACTION (0.3ms) COMMIT
38626
+ TRANSACTION (0.1ms) BEGIN
38627
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.583636"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.583636"]]
38628
+ TRANSACTION (0.3ms) COMMIT
38629
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 9], ["LIMIT", 1]]
38630
+ TRANSACTION (0.1ms) BEGIN
38631
+ SimpleWallet::Transaction::Credit Create (0.2ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 9], ["amount", 35], ["created_at", "2026-04-11 16:52:11.585084"], ["note", "My custom transaction note"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.585084"]]
38632
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
38633
+ SELECT COALESCE(SUM(amount), 0)
38634
+ FROM simple_wallet_transactions
38635
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38636
+ ),
38637
+ income = (
38638
+ SELECT COALESCE(SUM(amount), 0)
38639
+ FROM simple_wallet_transactions
38640
+ WHERE
38641
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38642
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38643
+ ),
38644
+ outcome = (
38645
+ SELECT COALESCE(SUM(amount), 0)
38646
+ FROM simple_wallet_transactions
38647
+ WHERE
38648
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38649
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38650
+ )
38651
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 9]]
38652
+ TRANSACTION (0.4ms) COMMIT
38653
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 9], ["LIMIT", 1]]
38654
+ TRANSACTION (0.1ms) BEGIN
38655
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.587131"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.587131"]]
38656
+ TRANSACTION (0.3ms) COMMIT
38657
+ SimpleWallet::Transaction Count (0.3ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 10]]
38658
+ TRANSACTION (0.1ms) BEGIN
38659
+ SimpleWallet::Transaction::Credit Create (0.4ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 10], ["amount", 35], ["created_at", "2026-04-11 16:52:11.594724"], ["note", "My custom transaction note"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.594724"]]
38660
+ SimpleWallet::Account Update All (0.5ms) UPDATE "simple_wallet_accounts" SET balance = (
38661
+ SELECT COALESCE(SUM(amount), 0)
38662
+ FROM simple_wallet_transactions
38663
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38664
+ ),
38665
+ income = (
38666
+ SELECT COALESCE(SUM(amount), 0)
38667
+ FROM simple_wallet_transactions
38668
+ WHERE
38669
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38670
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38671
+ ),
38672
+ outcome = (
38673
+ SELECT COALESCE(SUM(amount), 0)
38674
+ FROM simple_wallet_transactions
38675
+ WHERE
38676
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38677
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38678
+ )
38679
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 10]]
38680
+ TRANSACTION (0.5ms) COMMIT
38681
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 10]]
38682
+ SimpleWallet::Transaction Load (0.5ms) SELECT "simple_wallet_transactions".* FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 ORDER BY "simple_wallet_transactions"."id" DESC LIMIT $2 [["account_id", 10], ["LIMIT", 1]]
38683
+ TRANSACTION (0.1ms) BEGIN
38684
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.598592"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.598592"]]
38685
+ TRANSACTION (0.4ms) COMMIT
38686
+ TRANSACTION (0.1ms) BEGIN
38687
+ SimpleWallet::Transaction::Credit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 11], ["amount", 1000000], ["created_at", "2026-04-11 16:52:11.599872"], ["note", "AI income"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.599872"]]
38688
+ SimpleWallet::Account Update All (0.4ms) UPDATE "simple_wallet_accounts" SET balance = (
38689
+ SELECT COALESCE(SUM(amount), 0)
38690
+ FROM simple_wallet_transactions
38691
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38692
+ ),
38693
+ income = (
38694
+ SELECT COALESCE(SUM(amount), 0)
38695
+ FROM simple_wallet_transactions
38696
+ WHERE
38697
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38698
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38699
+ ),
38700
+ outcome = (
38701
+ SELECT COALESCE(SUM(amount), 0)
38702
+ FROM simple_wallet_transactions
38703
+ WHERE
38704
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38705
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38706
+ )
38707
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 11]]
38708
+ TRANSACTION (0.4ms) COMMIT
38709
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 11], ["LIMIT", 1]]
38710
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 11], ["LIMIT", 1]]
38711
+ TRANSACTION (0.1ms) BEGIN
38712
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.602172"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.602172"]]
38713
+ TRANSACTION (0.3ms) COMMIT
38714
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 12], ["LIMIT", 1]]
38715
+ TRANSACTION (0.2ms) BEGIN
38716
+ SimpleWallet::Transaction::Debit Create (0.4ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 11], ["amount", -25], ["created_at", "2026-04-11 16:52:11.603552"], ["note", "Here is your alms."], ["pre_account_balance", 1000000], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Debit"], ["updated_at", "2026-04-11 16:52:11.603552"]]
38717
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
38718
+ SELECT COALESCE(SUM(amount), 0)
38719
+ FROM simple_wallet_transactions
38720
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38721
+ ),
38722
+ income = (
38723
+ SELECT COALESCE(SUM(amount), 0)
38724
+ FROM simple_wallet_transactions
38725
+ WHERE
38726
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38727
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38728
+ ),
38729
+ outcome = (
38730
+ SELECT COALESCE(SUM(amount), 0)
38731
+ FROM simple_wallet_transactions
38732
+ WHERE
38733
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38734
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38735
+ )
38736
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 11]]
38737
+ SimpleWallet::Transaction::Credit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 12], ["amount", 25], ["created_at", "2026-04-11 16:52:11.605083"], ["note", "Here is your alms."], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.605083"]]
38738
+ SimpleWallet::Account Update All (0.4ms) UPDATE "simple_wallet_accounts" SET balance = (
38739
+ SELECT COALESCE(SUM(amount), 0)
38740
+ FROM simple_wallet_transactions
38741
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38742
+ ),
38743
+ income = (
38744
+ SELECT COALESCE(SUM(amount), 0)
38745
+ FROM simple_wallet_transactions
38746
+ WHERE
38747
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38748
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38749
+ ),
38750
+ outcome = (
38751
+ SELECT COALESCE(SUM(amount), 0)
38752
+ FROM simple_wallet_transactions
38753
+ WHERE
38754
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38755
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38756
+ )
38757
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 12]]
38758
+ TRANSACTION (0.4ms) COMMIT
38759
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 11], ["LIMIT", 1]]
38760
+ SimpleWallet::Account Load (0.0ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 12], ["LIMIT", 1]]
38761
+ TRANSACTION (0.1ms) BEGIN
38762
+ SimpleWallet::Account Create (0.3ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.607494"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.607494"]]
38763
+ TRANSACTION (0.3ms) COMMIT
38764
+ TRANSACTION (0.1ms) BEGIN
38765
+ SimpleWallet::Transaction::Credit Create (0.2ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 13], ["amount", 1000000], ["created_at", "2026-04-11 16:52:11.608617"], ["note", "AI income"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.608617"]]
38766
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
38767
+ SELECT COALESCE(SUM(amount), 0)
38768
+ FROM simple_wallet_transactions
38769
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38770
+ ),
38771
+ income = (
38772
+ SELECT COALESCE(SUM(amount), 0)
38773
+ FROM simple_wallet_transactions
38774
+ WHERE
38775
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38776
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38777
+ ),
38778
+ outcome = (
38779
+ SELECT COALESCE(SUM(amount), 0)
38780
+ FROM simple_wallet_transactions
38781
+ WHERE
38782
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38783
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38784
+ )
38785
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 13]]
38786
+ TRANSACTION (0.3ms) COMMIT
38787
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 13], ["LIMIT", 1]]
38788
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 13]]
38789
+ TRANSACTION (0.1ms) BEGIN
38790
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.610817"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.610817"]]
38791
+ TRANSACTION (0.3ms) COMMIT
38792
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 14]]
38793
+ TRANSACTION (0.1ms) BEGIN
38794
+ SimpleWallet::Transaction::Debit Create (0.2ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 13], ["amount", -25], ["created_at", "2026-04-11 16:52:11.612215"], ["note", "Here is your alms."], ["pre_account_balance", 1000000], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Debit"], ["updated_at", "2026-04-11 16:52:11.612215"]]
38795
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
38796
+ SELECT COALESCE(SUM(amount), 0)
38797
+ FROM simple_wallet_transactions
38798
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38799
+ ),
38800
+ income = (
38801
+ SELECT COALESCE(SUM(amount), 0)
38802
+ FROM simple_wallet_transactions
38803
+ WHERE
38804
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38805
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38806
+ ),
38807
+ outcome = (
38808
+ SELECT COALESCE(SUM(amount), 0)
38809
+ FROM simple_wallet_transactions
38810
+ WHERE
38811
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38812
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38813
+ )
38814
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 13]]
38815
+ SimpleWallet::Transaction::Credit Create (0.1ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 14], ["amount", 25], ["created_at", "2026-04-11 16:52:11.613385"], ["note", "Here is your alms."], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.613385"]]
38816
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
38817
+ SELECT COALESCE(SUM(amount), 0)
38818
+ FROM simple_wallet_transactions
38819
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38820
+ ),
38821
+ income = (
38822
+ SELECT COALESCE(SUM(amount), 0)
38823
+ FROM simple_wallet_transactions
38824
+ WHERE
38825
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38826
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38827
+ ),
38828
+ outcome = (
38829
+ SELECT COALESCE(SUM(amount), 0)
38830
+ FROM simple_wallet_transactions
38831
+ WHERE
38832
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38833
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38834
+ )
38835
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 14]]
38836
+ TRANSACTION (0.5ms) COMMIT
38837
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 14]]
38838
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 13]]
38839
+ SimpleWallet::Transaction Load (0.1ms) SELECT "simple_wallet_transactions".* FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 ORDER BY "simple_wallet_transactions"."id" DESC LIMIT $2 [["account_id", 13], ["LIMIT", 1]]
38840
+ SimpleWallet::Transaction Load (0.1ms) SELECT "simple_wallet_transactions".* FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 ORDER BY "simple_wallet_transactions"."id" DESC LIMIT $2 [["account_id", 14], ["LIMIT", 1]]
38841
+ TRANSACTION (0.0ms) BEGIN
38842
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.616711"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.616711"]]
38843
+ TRANSACTION (0.4ms) COMMIT
38844
+ TRANSACTION (0.1ms) BEGIN
38845
+ SimpleWallet::Transaction::Credit Create (0.2ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 15], ["amount", 100], ["created_at", "2026-04-11 16:52:11.617860"], ["note", "Bonus!"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.617860"]]
38846
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
38847
+ SELECT COALESCE(SUM(amount), 0)
38848
+ FROM simple_wallet_transactions
38849
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38850
+ ),
38851
+ income = (
38852
+ SELECT COALESCE(SUM(amount), 0)
38853
+ FROM simple_wallet_transactions
38854
+ WHERE
38855
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38856
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38857
+ ),
38858
+ outcome = (
38859
+ SELECT COALESCE(SUM(amount), 0)
38860
+ FROM simple_wallet_transactions
38861
+ WHERE
38862
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38863
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38864
+ )
38865
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 15]]
38866
+ TRANSACTION (0.3ms) COMMIT
38867
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 15], ["LIMIT", 1]]
38868
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 15]]
38869
+ TRANSACTION (0.1ms) BEGIN
38870
+ SimpleWallet::Transaction::Debit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 15], ["amount", -100], ["created_at", "2026-04-11 16:52:11.620305"], ["note", "Penalty for cheating!"], ["pre_account_balance", 100], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Debit"], ["updated_at", "2026-04-11 16:52:11.620305"]]
38871
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
38872
+ SELECT COALESCE(SUM(amount), 0)
38873
+ FROM simple_wallet_transactions
38874
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38875
+ ),
38876
+ income = (
38877
+ SELECT COALESCE(SUM(amount), 0)
38878
+ FROM simple_wallet_transactions
38879
+ WHERE
38880
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38881
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38882
+ ),
38883
+ outcome = (
38884
+ SELECT COALESCE(SUM(amount), 0)
38885
+ FROM simple_wallet_transactions
38886
+ WHERE
38887
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38888
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38889
+ )
38890
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 15]]
38891
+ TRANSACTION (0.4ms) COMMIT
38892
+ SimpleWallet::Transaction Count (0.2ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 15]]
38893
+ SimpleWallet::Transaction Load (0.2ms) SELECT "simple_wallet_transactions".* FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 ORDER BY "simple_wallet_transactions"."id" DESC LIMIT $2 [["account_id", 15], ["LIMIT", 1]]
38894
+ TRANSACTION (0.1ms) BEGIN
38895
+ SimpleWallet::Account Create (0.3ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.623442"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.623442"]]
38896
+ TRANSACTION (0.4ms) COMMIT
38897
+ TRANSACTION (0.1ms) BEGIN
38898
+ SimpleWallet::Transaction::Credit Create (0.4ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 16], ["amount", 100], ["created_at", "2026-04-11 16:52:11.624963"], ["note", "Bonus!"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.624963"]]
38899
+ SimpleWallet::Account Update All (0.6ms) UPDATE "simple_wallet_accounts" SET balance = (
38900
+ SELECT COALESCE(SUM(amount), 0)
38901
+ FROM simple_wallet_transactions
38902
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38903
+ ),
38904
+ income = (
38905
+ SELECT COALESCE(SUM(amount), 0)
38906
+ FROM simple_wallet_transactions
38907
+ WHERE
38908
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38909
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38910
+ ),
38911
+ outcome = (
38912
+ SELECT COALESCE(SUM(amount), 0)
38913
+ FROM simple_wallet_transactions
38914
+ WHERE
38915
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38916
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38917
+ )
38918
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 16]]
38919
+ TRANSACTION (0.4ms) COMMIT
38920
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 16], ["LIMIT", 1]]
38921
+ TRANSACTION (0.1ms) BEGIN
38922
+ SimpleWallet::Account Create (0.5ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.629610"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.629610"]]
38923
+ TRANSACTION (0.6ms) COMMIT
38924
+ TRANSACTION (0.1ms) BEGIN
38925
+ SimpleWallet::Account Create (0.6ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.632928"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.632928"]]
38926
+ TRANSACTION (0.7ms) COMMIT
38927
+ TRANSACTION (0.1ms) BEGIN
38928
+ SimpleWallet::Transaction::Credit Create (0.7ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 18], ["amount", 1000000], ["created_at", "2026-04-11 16:52:11.635632"], ["note", "AI income"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.635632"]]
38929
+ SimpleWallet::Account Update All (0.9ms) UPDATE "simple_wallet_accounts" SET balance = (
38930
+ SELECT COALESCE(SUM(amount), 0)
38931
+ FROM simple_wallet_transactions
38932
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38933
+ ),
38934
+ income = (
38935
+ SELECT COALESCE(SUM(amount), 0)
38936
+ FROM simple_wallet_transactions
38937
+ WHERE
38938
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38939
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38940
+ ),
38941
+ outcome = (
38942
+ SELECT COALESCE(SUM(amount), 0)
38943
+ FROM simple_wallet_transactions
38944
+ WHERE
38945
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38946
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38947
+ )
38948
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 18]]
38949
+ TRANSACTION (0.5ms) COMMIT
38950
+ SimpleWallet::Account Load (0.2ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 18], ["LIMIT", 1]]
38951
+ SimpleWallet::Account Load (0.2ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 18], ["LIMIT", 1]]
38952
+ TRANSACTION (0.1ms) BEGIN
38953
+ SimpleWallet::Account Create (0.5ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.641195"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.641195"]]
38954
+ TRANSACTION (0.4ms) COMMIT
38955
+ SimpleWallet::Account Load (0.2ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 19], ["LIMIT", 1]]
38956
+ SimpleWallet::Account Load (0.2ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 19], ["LIMIT", 1]]
38957
+ SimpleWallet::Account Load (0.2ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 18], ["LIMIT", 1]]
38958
+ TRANSACTION (0.1ms) BEGIN
38959
+ SimpleWallet::Account Create (0.4ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.645414"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.645414"]]
38960
+ TRANSACTION (0.6ms) COMMIT
38961
+ TRANSACTION (0.2ms) BEGIN
38962
+ SimpleWallet::Transaction::Credit Create (0.5ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 20], ["amount", 1000000], ["created_at", "2026-04-11 16:52:11.647221"], ["note", "AI income"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.647221"]]
38963
+ SimpleWallet::Account Update All (0.4ms) UPDATE "simple_wallet_accounts" SET balance = (
38964
+ SELECT COALESCE(SUM(amount), 0)
38965
+ FROM simple_wallet_transactions
38966
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
38967
+ ),
38968
+ income = (
38969
+ SELECT COALESCE(SUM(amount), 0)
38970
+ FROM simple_wallet_transactions
38971
+ WHERE
38972
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
38973
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38974
+ ),
38975
+ outcome = (
38976
+ SELECT COALESCE(SUM(amount), 0)
38977
+ FROM simple_wallet_transactions
38978
+ WHERE
38979
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
38980
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
38981
+ )
38982
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 20]]
38983
+ TRANSACTION (0.3ms) COMMIT
38984
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 20], ["LIMIT", 1]]
38985
+ SimpleWallet::Transaction Count (0.2ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 20]]
38986
+ TRANSACTION (0.1ms) BEGIN
38987
+ SimpleWallet::Account Create (0.5ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.650239"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.650239"]]
38988
+ TRANSACTION (0.5ms) COMMIT
38989
+ SimpleWallet::Transaction Count (0.2ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 21]]
38990
+ SimpleWallet::Transaction Count (0.3ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 21]]
38991
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 20]]
38992
+ TRANSACTION (0.2ms) BEGIN
38993
+ SimpleWallet::Account Create (0.3ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.653917"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.653917"]]
38994
+ TRANSACTION (0.6ms) COMMIT
38995
+ TRANSACTION (0.0ms) BEGIN
38996
+ SimpleWallet::Transaction::Credit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 22], ["amount", 1000000], ["created_at", "2026-04-11 16:52:11.655433"], ["note", "AI income"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.655433"]]
38997
+ SimpleWallet::Account Update All (0.5ms) UPDATE "simple_wallet_accounts" SET balance = (
38998
+ SELECT COALESCE(SUM(amount), 0)
38999
+ FROM simple_wallet_transactions
39000
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39001
+ ),
39002
+ income = (
39003
+ SELECT COALESCE(SUM(amount), 0)
39004
+ FROM simple_wallet_transactions
39005
+ WHERE
39006
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39007
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39008
+ ),
39009
+ outcome = (
39010
+ SELECT COALESCE(SUM(amount), 0)
39011
+ FROM simple_wallet_transactions
39012
+ WHERE
39013
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39014
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39015
+ )
39016
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 22]]
39017
+ TRANSACTION (0.3ms) COMMIT
39018
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 22], ["LIMIT", 1]]
39019
+ TRANSACTION (0.1ms) BEGIN
39020
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.657863"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.657863"]]
39021
+ TRANSACTION (0.4ms) COMMIT
39022
+ TRANSACTION (0.1ms) BEGIN
39023
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.659600"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.659600"]]
39024
+ TRANSACTION (0.3ms) COMMIT
39025
+ TRANSACTION (0.1ms) BEGIN
39026
+ SimpleWallet::Transaction::Credit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 24], ["amount", 1000000], ["created_at", "2026-04-11 16:52:11.660904"], ["note", "AI income"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.660904"]]
39027
+ SimpleWallet::Account Update All (0.5ms) UPDATE "simple_wallet_accounts" SET balance = (
39028
+ SELECT COALESCE(SUM(amount), 0)
39029
+ FROM simple_wallet_transactions
39030
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39031
+ ),
39032
+ income = (
39033
+ SELECT COALESCE(SUM(amount), 0)
39034
+ FROM simple_wallet_transactions
39035
+ WHERE
39036
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39037
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39038
+ ),
39039
+ outcome = (
39040
+ SELECT COALESCE(SUM(amount), 0)
39041
+ FROM simple_wallet_transactions
39042
+ WHERE
39043
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39044
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39045
+ )
39046
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 24]]
39047
+ TRANSACTION (0.4ms) COMMIT
39048
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 24], ["LIMIT", 1]]
39049
+ TRANSACTION (0.1ms) BEGIN
39050
+ SimpleWallet::Account Create (0.3ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.663743"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.663743"]]
39051
+ TRANSACTION (0.4ms) COMMIT
39052
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 24], ["LIMIT", 1]]
39053
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 25], ["LIMIT", 1]]
39054
+ TRANSACTION (0.1ms) BEGIN
39055
+ SimpleWallet::Transaction::Debit Create (0.4ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 24], ["amount", -25], ["created_at", "2026-04-11 16:52:11.666400"], ["note", "Here is your alms."], ["pre_account_balance", 1000000], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Debit"], ["updated_at", "2026-04-11 16:52:11.666400"]]
39056
+ SimpleWallet::Account Update All (0.6ms) UPDATE "simple_wallet_accounts" SET balance = (
39057
+ SELECT COALESCE(SUM(amount), 0)
39058
+ FROM simple_wallet_transactions
39059
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39060
+ ),
39061
+ income = (
39062
+ SELECT COALESCE(SUM(amount), 0)
39063
+ FROM simple_wallet_transactions
39064
+ WHERE
39065
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39066
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39067
+ ),
39068
+ outcome = (
39069
+ SELECT COALESCE(SUM(amount), 0)
39070
+ FROM simple_wallet_transactions
39071
+ WHERE
39072
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39073
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39074
+ )
39075
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 24]]
39076
+ SimpleWallet::Transaction::Credit Create (0.2ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 25], ["amount", 25], ["created_at", "2026-04-11 16:52:11.668480"], ["note", "Here is your alms."], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.668480"]]
39077
+ SimpleWallet::Account Update All (0.5ms) UPDATE "simple_wallet_accounts" SET balance = (
39078
+ SELECT COALESCE(SUM(amount), 0)
39079
+ FROM simple_wallet_transactions
39080
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39081
+ ),
39082
+ income = (
39083
+ SELECT COALESCE(SUM(amount), 0)
39084
+ FROM simple_wallet_transactions
39085
+ WHERE
39086
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39087
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39088
+ ),
39089
+ outcome = (
39090
+ SELECT COALESCE(SUM(amount), 0)
39091
+ FROM simple_wallet_transactions
39092
+ WHERE
39093
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39094
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39095
+ )
39096
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 25]]
39097
+ TRANSACTION (0.1ms) ROLLBACK
39098
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 25], ["LIMIT", 1]]
39099
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 24], ["LIMIT", 1]]
39100
+ TRANSACTION (0.1ms) BEGIN
39101
+ SimpleWallet::Account Create (0.3ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.671367"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.671367"]]
39102
+ TRANSACTION (0.4ms) COMMIT
39103
+ TRANSACTION (0.1ms) BEGIN
39104
+ SimpleWallet::Transaction::Credit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 26], ["amount", 1000000], ["created_at", "2026-04-11 16:52:11.672794"], ["note", "AI income"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.672794"]]
39105
+ SimpleWallet::Account Update All (0.4ms) UPDATE "simple_wallet_accounts" SET balance = (
39106
+ SELECT COALESCE(SUM(amount), 0)
39107
+ FROM simple_wallet_transactions
39108
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39109
+ ),
39110
+ income = (
39111
+ SELECT COALESCE(SUM(amount), 0)
39112
+ FROM simple_wallet_transactions
39113
+ WHERE
39114
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39115
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39116
+ ),
39117
+ outcome = (
39118
+ SELECT COALESCE(SUM(amount), 0)
39119
+ FROM simple_wallet_transactions
39120
+ WHERE
39121
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39122
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39123
+ )
39124
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 26]]
39125
+ TRANSACTION (0.4ms) COMMIT
39126
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 26], ["LIMIT", 1]]
39127
+ TRANSACTION (0.1ms) BEGIN
39128
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.675085"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.675085"]]
39129
+ TRANSACTION (0.3ms) COMMIT
39130
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 26]]
39131
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 27]]
39132
+ TRANSACTION (0.1ms) BEGIN
39133
+ SimpleWallet::Transaction::Debit Create (0.2ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 26], ["amount", -25], ["created_at", "2026-04-11 16:52:11.677070"], ["note", "Here is your alms."], ["pre_account_balance", 1000000], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Debit"], ["updated_at", "2026-04-11 16:52:11.677070"]]
39134
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
39135
+ SELECT COALESCE(SUM(amount), 0)
39136
+ FROM simple_wallet_transactions
39137
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39138
+ ),
39139
+ income = (
39140
+ SELECT COALESCE(SUM(amount), 0)
39141
+ FROM simple_wallet_transactions
39142
+ WHERE
39143
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39144
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39145
+ ),
39146
+ outcome = (
39147
+ SELECT COALESCE(SUM(amount), 0)
39148
+ FROM simple_wallet_transactions
39149
+ WHERE
39150
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39151
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39152
+ )
39153
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 26]]
39154
+ SimpleWallet::Transaction::Credit Create (0.1ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 27], ["amount", 25], ["created_at", "2026-04-11 16:52:11.678380"], ["note", "Here is your alms."], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.678380"]]
39155
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
39156
+ SELECT COALESCE(SUM(amount), 0)
39157
+ FROM simple_wallet_transactions
39158
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39159
+ ),
39160
+ income = (
39161
+ SELECT COALESCE(SUM(amount), 0)
39162
+ FROM simple_wallet_transactions
39163
+ WHERE
39164
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39165
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39166
+ ),
39167
+ outcome = (
39168
+ SELECT COALESCE(SUM(amount), 0)
39169
+ FROM simple_wallet_transactions
39170
+ WHERE
39171
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39172
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39173
+ )
39174
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 27]]
39175
+ TRANSACTION (0.0ms) ROLLBACK
39176
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 27]]
39177
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 26]]
39178
+ TRANSACTION (0.1ms) BEGIN
39179
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.680346"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.680346"]]
39180
+ TRANSACTION (0.5ms) COMMIT
39181
+ SimpleWallet::Account Update (0.5ms) UPDATE "simple_wallet_accounts" SET "balance" = $1 WHERE "simple_wallet_accounts"."id" = $2 [["balance", -5], ["id", 28]]
39182
+ TRANSACTION (0.1ms) BEGIN
39183
+ SimpleWallet::Account Create (0.3ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.690075"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.690075"]]
39184
+ TRANSACTION (0.3ms) COMMIT
39185
+ TRANSACTION (0.1ms) BEGIN
39186
+ SimpleWallet::Transaction::Credit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 29], ["amount", 100], ["created_at", "2026-04-11 16:52:11.691352"], ["note", "Bonus!"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.691352"]]
39187
+ SimpleWallet::Account Update All (0.4ms) UPDATE "simple_wallet_accounts" SET balance = (
39188
+ SELECT COALESCE(SUM(amount), 0)
39189
+ FROM simple_wallet_transactions
39190
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39191
+ ),
39192
+ income = (
39193
+ SELECT COALESCE(SUM(amount), 0)
39194
+ FROM simple_wallet_transactions
39195
+ WHERE
39196
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39197
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39198
+ ),
39199
+ outcome = (
39200
+ SELECT COALESCE(SUM(amount), 0)
39201
+ FROM simple_wallet_transactions
39202
+ WHERE
39203
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39204
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39205
+ )
39206
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 29]]
39207
+ TRANSACTION (0.4ms) COMMIT
39208
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 29], ["LIMIT", 1]]
39209
+ TRANSACTION (0.1ms) BEGIN
39210
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.694006"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.694006"]]
39211
+ TRANSACTION (0.3ms) COMMIT
39212
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 30], ["LIMIT", 1]]
39213
+ SimpleWallet::Account Update All (0.7ms) UPDATE "simple_wallet_accounts" SET balance = (
39214
+ SELECT COALESCE(SUM(amount), 0)
39215
+ FROM simple_wallet_transactions
39216
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39217
+ ),
39218
+ income = (
39219
+ SELECT COALESCE(SUM(amount), 0)
39220
+ FROM simple_wallet_transactions
39221
+ WHERE
39222
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39223
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39224
+ ),
39225
+ outcome = (
39226
+ SELECT COALESCE(SUM(amount), 0)
39227
+ FROM simple_wallet_transactions
39228
+ WHERE
39229
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39230
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39231
+ )
39232
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 30]]
39233
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 30], ["LIMIT", 1]]
39234
+ TRANSACTION (0.1ms) BEGIN
39235
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.696901"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.696901"]]
39236
+ TRANSACTION (0.3ms) COMMIT
39237
+ TRANSACTION (0.1ms) BEGIN
39238
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.698414"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.698414"]]
39239
+ TRANSACTION (0.3ms) COMMIT
39240
+ TRANSACTION (0.1ms) BEGIN
39241
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.700072"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.700072"]]
39242
+ TRANSACTION (0.3ms) COMMIT
39243
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 33], ["LIMIT", 1]]
39244
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 33], ["LIMIT", 1]]
39245
+ TRANSACTION (0.1ms) BEGIN
39246
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.702272"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.702272"]]
39247
+ TRANSACTION (0.5ms) COMMIT
39248
+ SimpleWallet::Transaction Count (0.2ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 34]]
39249
+ SimpleWallet::Transaction Count (0.2ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 34]]
39250
+ TRANSACTION (0.1ms) BEGIN
39251
+ SimpleWallet::Account Create (0.3ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.705171"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.705171"]]
39252
+ TRANSACTION (0.3ms) COMMIT
39253
+ TRANSACTION (0.1ms) BEGIN
39254
+ SimpleWallet::Transaction::Debit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 35], ["amount", -75], ["created_at", "2026-04-11 16:52:11.706320"], ["note", "Shopping..."], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Debit"], ["updated_at", "2026-04-11 16:52:11.706320"]]
39255
+ TRANSACTION (0.3ms) COMMIT
39256
+ SimpleWallet::Transaction::Debit Update (0.3ms) UPDATE "simple_wallet_transactions" SET "amount" = $1 WHERE "simple_wallet_transactions"."id" = $2 [["amount", 5], ["id", 29]]
39257
+ TRANSACTION (0.1ms) BEGIN
39258
+ SimpleWallet::Account Create (0.3ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.713137"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.713137"]]
39259
+ TRANSACTION (0.3ms) COMMIT
39260
+ TRANSACTION (0.1ms) BEGIN
39261
+ SimpleWallet::Transaction::Credit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 36], ["amount", 1000000], ["created_at", "2026-04-11 16:52:11.714353"], ["note", "AI income"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.714353"]]
39262
+ SimpleWallet::Account Update All (0.4ms) UPDATE "simple_wallet_accounts" SET balance = (
39263
+ SELECT COALESCE(SUM(amount), 0)
39264
+ FROM simple_wallet_transactions
39265
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39266
+ ),
39267
+ income = (
39268
+ SELECT COALESCE(SUM(amount), 0)
39269
+ FROM simple_wallet_transactions
39270
+ WHERE
39271
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39272
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39273
+ ),
39274
+ outcome = (
39275
+ SELECT COALESCE(SUM(amount), 0)
39276
+ FROM simple_wallet_transactions
39277
+ WHERE
39278
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39279
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39280
+ )
39281
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 36]]
39282
+ TRANSACTION (0.3ms) COMMIT
39283
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 36], ["LIMIT", 1]]
39284
+ TRANSACTION (0.1ms) BEGIN
39285
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.716905"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.716905"]]
39286
+ TRANSACTION (0.3ms) COMMIT
39287
+ TRANSACTION (0.1ms) BEGIN
39288
+ SimpleWallet::Transaction::Credit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 37], ["amount", 100], ["created_at", "2026-04-11 16:52:11.718133"], ["note", "Bonus!"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.718133"]]
39289
+ SimpleWallet::Account Update All (0.4ms) UPDATE "simple_wallet_accounts" SET balance = (
39290
+ SELECT COALESCE(SUM(amount), 0)
39291
+ FROM simple_wallet_transactions
39292
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39293
+ ),
39294
+ income = (
39295
+ SELECT COALESCE(SUM(amount), 0)
39296
+ FROM simple_wallet_transactions
39297
+ WHERE
39298
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39299
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39300
+ ),
39301
+ outcome = (
39302
+ SELECT COALESCE(SUM(amount), 0)
39303
+ FROM simple_wallet_transactions
39304
+ WHERE
39305
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39306
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39307
+ )
39308
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 37]]
39309
+ TRANSACTION (0.4ms) COMMIT
39310
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 37], ["LIMIT", 1]]
39311
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 37], ["LIMIT", 1]]
39312
+ TRANSACTION (0.1ms) BEGIN
39313
+ SimpleWallet::Transaction::Debit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 37], ["amount", -35], ["created_at", "2026-04-11 16:52:11.720839"], ["note", "My custom transaction note"], ["pre_account_balance", 100], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Debit"], ["updated_at", "2026-04-11 16:52:11.720839"]]
39314
+ SimpleWallet::Account Update All (0.4ms) UPDATE "simple_wallet_accounts" SET balance = (
39315
+ SELECT COALESCE(SUM(amount), 0)
39316
+ FROM simple_wallet_transactions
39317
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39318
+ ),
39319
+ income = (
39320
+ SELECT COALESCE(SUM(amount), 0)
39321
+ FROM simple_wallet_transactions
39322
+ WHERE
39323
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39324
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39325
+ ),
39326
+ outcome = (
39327
+ SELECT COALESCE(SUM(amount), 0)
39328
+ FROM simple_wallet_transactions
39329
+ WHERE
39330
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39331
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39332
+ )
39333
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 37]]
39334
+ TRANSACTION (0.5ms) COMMIT
39335
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 37], ["LIMIT", 1]]
39336
+ TRANSACTION (0.1ms) BEGIN
39337
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.723260"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.723260"]]
39338
+ TRANSACTION (0.3ms) COMMIT
39339
+ TRANSACTION (0.0ms) BEGIN
39340
+ SimpleWallet::Transaction::Credit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 38], ["amount", 100], ["created_at", "2026-04-11 16:52:11.724428"], ["note", "Bonus!"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.724428"]]
39341
+ SimpleWallet::Account Update All (0.4ms) UPDATE "simple_wallet_accounts" SET balance = (
39342
+ SELECT COALESCE(SUM(amount), 0)
39343
+ FROM simple_wallet_transactions
39344
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39345
+ ),
39346
+ income = (
39347
+ SELECT COALESCE(SUM(amount), 0)
39348
+ FROM simple_wallet_transactions
39349
+ WHERE
39350
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39351
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39352
+ ),
39353
+ outcome = (
39354
+ SELECT COALESCE(SUM(amount), 0)
39355
+ FROM simple_wallet_transactions
39356
+ WHERE
39357
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39358
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39359
+ )
39360
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 38]]
39361
+ TRANSACTION (0.3ms) COMMIT
39362
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 38], ["LIMIT", 1]]
39363
+ SimpleWallet::Transaction Count (0.2ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 38]]
39364
+ TRANSACTION (0.1ms) BEGIN
39365
+ SimpleWallet::Transaction::Debit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 38], ["amount", -35], ["created_at", "2026-04-11 16:52:11.727121"], ["note", "My custom transaction note"], ["pre_account_balance", 100], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Debit"], ["updated_at", "2026-04-11 16:52:11.727121"]]
39366
+ SimpleWallet::Account Update All (0.4ms) UPDATE "simple_wallet_accounts" SET balance = (
39367
+ SELECT COALESCE(SUM(amount), 0)
39368
+ FROM simple_wallet_transactions
39369
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39370
+ ),
39371
+ income = (
39372
+ SELECT COALESCE(SUM(amount), 0)
39373
+ FROM simple_wallet_transactions
39374
+ WHERE
39375
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39376
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39377
+ ),
39378
+ outcome = (
39379
+ SELECT COALESCE(SUM(amount), 0)
39380
+ FROM simple_wallet_transactions
39381
+ WHERE
39382
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39383
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39384
+ )
39385
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 38]]
39386
+ TRANSACTION (0.4ms) COMMIT
39387
+ SimpleWallet::Transaction Count (0.2ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 38]]
39388
+ TRANSACTION (0.1ms) BEGIN
39389
+ SimpleWallet::Account Update All (0.5ms) UPDATE "simple_wallet_accounts" SET balance = (
39390
+ SELECT COALESCE(SUM(amount), 0)
39391
+ FROM simple_wallet_transactions
39392
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39393
+ ),
39394
+ income = (
39395
+ SELECT COALESCE(SUM(amount), 0)
39396
+ FROM simple_wallet_transactions
39397
+ WHERE
39398
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39399
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39400
+ ),
39401
+ outcome = (
39402
+ SELECT COALESCE(SUM(amount), 0)
39403
+ FROM simple_wallet_transactions
39404
+ WHERE
39405
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39406
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39407
+ )
39408
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 38]]
39409
+ TRANSACTION (0.4ms) COMMIT
39410
+ SimpleWallet::Transaction Load (0.2ms) SELECT "simple_wallet_transactions".* FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 ORDER BY "simple_wallet_transactions"."id" DESC LIMIT $2 [["account_id", 38], ["LIMIT", 1]]
39411
+ TRANSACTION (0.1ms) BEGIN
39412
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.731424"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.731424"]]
39413
+ TRANSACTION (0.3ms) COMMIT
39414
+ TRANSACTION (0.1ms) BEGIN
39415
+ SimpleWallet::Transaction::Credit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 39], ["amount", 100], ["created_at", "2026-04-11 16:52:11.732610"], ["note", "Bonus!"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.732610"]]
39416
+ SimpleWallet::Account Update All (0.4ms) UPDATE "simple_wallet_accounts" SET balance = (
39417
+ SELECT COALESCE(SUM(amount), 0)
39418
+ FROM simple_wallet_transactions
39419
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39420
+ ),
39421
+ income = (
39422
+ SELECT COALESCE(SUM(amount), 0)
39423
+ FROM simple_wallet_transactions
39424
+ WHERE
39425
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39426
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39427
+ ),
39428
+ outcome = (
39429
+ SELECT COALESCE(SUM(amount), 0)
39430
+ FROM simple_wallet_transactions
39431
+ WHERE
39432
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39433
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39434
+ )
39435
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 39]]
39436
+ TRANSACTION (0.4ms) COMMIT
39437
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 39], ["LIMIT", 1]]
39438
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 39], ["LIMIT", 1]]
39439
+ TRANSACTION (0.1ms) BEGIN
39440
+ SimpleWallet::Transaction::Debit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 39], ["amount", -35], ["created_at", "2026-04-11 16:52:11.735233"], ["note", "My custom transaction note"], ["pre_account_balance", 100], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Debit"], ["updated_at", "2026-04-11 16:52:11.735233"]]
39441
+ TRANSACTION (0.1ms) ROLLBACK
39442
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 39], ["LIMIT", 1]]
39443
+ TRANSACTION (0.1ms) BEGIN
39444
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.736672"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.736672"]]
39445
+ TRANSACTION (0.4ms) COMMIT
39446
+ TRANSACTION (0.1ms) BEGIN
39447
+ SimpleWallet::Transaction::Credit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 40], ["amount", 100], ["created_at", "2026-04-11 16:52:11.737862"], ["note", "Bonus!"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.737862"]]
39448
+ SimpleWallet::Account Update All (0.4ms) UPDATE "simple_wallet_accounts" SET balance = (
39449
+ SELECT COALESCE(SUM(amount), 0)
39450
+ FROM simple_wallet_transactions
39451
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39452
+ ),
39453
+ income = (
39454
+ SELECT COALESCE(SUM(amount), 0)
39455
+ FROM simple_wallet_transactions
39456
+ WHERE
39457
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39458
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39459
+ ),
39460
+ outcome = (
39461
+ SELECT COALESCE(SUM(amount), 0)
39462
+ FROM simple_wallet_transactions
39463
+ WHERE
39464
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39465
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39466
+ )
39467
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 40]]
39468
+ TRANSACTION (0.5ms) COMMIT
39469
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 40], ["LIMIT", 1]]
39470
+ SimpleWallet::Transaction Count (0.2ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 40]]
39471
+ TRANSACTION (0.1ms) BEGIN
39472
+ SimpleWallet::Transaction::Debit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 40], ["amount", -35], ["created_at", "2026-04-11 16:52:11.740814"], ["note", "My custom transaction note"], ["pre_account_balance", 100], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Debit"], ["updated_at", "2026-04-11 16:52:11.740814"]]
39473
+ TRANSACTION (0.1ms) ROLLBACK
39474
+ SimpleWallet::Transaction Count (0.2ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 40]]
39475
+ TRANSACTION (0.1ms) BEGIN
39476
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.742465"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.742465"]]
39477
+ TRANSACTION (0.3ms) COMMIT
39478
+ TRANSACTION (0.0ms) BEGIN
39479
+ SimpleWallet::Transaction::Credit Create (0.3ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 41], ["amount", 30], ["created_at", "2026-04-11 16:52:11.743561"], ["note", "Bonus!"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.743561"]]
39480
+ TRANSACTION (0.3ms) COMMIT
39481
+ SimpleWallet::Transaction::Credit Update (0.3ms) UPDATE "simple_wallet_transactions" SET "amount" = $1 WHERE "simple_wallet_transactions"."id" = $2 [["amount", -5], ["id", 39]]
39482
+ TRANSACTION (0.3ms) BEGIN
39483
+ SimpleWallet::Account Create (0.6ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.750372"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.750372"]]
39484
+ TRANSACTION (0.5ms) COMMIT
39485
+ TRANSACTION (0.2ms) BEGIN
39486
+ SimpleWallet::Transaction::Credit Create (0.6ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 42], ["amount", 1000000], ["created_at", "2026-04-11 16:52:11.752134"], ["note", "AI income"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.752134"]]
39487
+ SimpleWallet::Account Update All (0.5ms) UPDATE "simple_wallet_accounts" SET balance = (
39488
+ SELECT COALESCE(SUM(amount), 0)
39489
+ FROM simple_wallet_transactions
39490
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39491
+ ),
39492
+ income = (
39493
+ SELECT COALESCE(SUM(amount), 0)
39494
+ FROM simple_wallet_transactions
39495
+ WHERE
39496
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39497
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39498
+ ),
39499
+ outcome = (
39500
+ SELECT COALESCE(SUM(amount), 0)
39501
+ FROM simple_wallet_transactions
39502
+ WHERE
39503
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39504
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39505
+ )
39506
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 42]]
39507
+ TRANSACTION (0.5ms) COMMIT
39508
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 42], ["LIMIT", 1]]
39509
+ TRANSACTION (0.0ms) BEGIN
39510
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.754949"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.754949"]]
39511
+ TRANSACTION (0.3ms) COMMIT
39512
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 42], ["LIMIT", 1]]
39513
+ SimpleWallet::Account Load (0.0ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 43], ["LIMIT", 1]]
39514
+ TRANSACTION (0.1ms) BEGIN
39515
+ SimpleWallet::Transaction::Debit Create (0.2ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 42], ["amount", -25], ["created_at", "2026-04-11 16:52:11.756617"], ["note", "Here is your alms."], ["pre_account_balance", 1000000], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Debit"], ["updated_at", "2026-04-11 16:52:11.756617"]]
39516
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
39517
+ SELECT COALESCE(SUM(amount), 0)
39518
+ FROM simple_wallet_transactions
39519
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39520
+ ),
39521
+ income = (
39522
+ SELECT COALESCE(SUM(amount), 0)
39523
+ FROM simple_wallet_transactions
39524
+ WHERE
39525
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39526
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39527
+ ),
39528
+ outcome = (
39529
+ SELECT COALESCE(SUM(amount), 0)
39530
+ FROM simple_wallet_transactions
39531
+ WHERE
39532
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39533
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39534
+ )
39535
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 42]]
39536
+ TRANSACTION (0.1ms) ROLLBACK
39537
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 43], ["LIMIT", 1]]
39538
+ SimpleWallet::Account Load (0.0ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 42], ["LIMIT", 1]]
39539
+ TRANSACTION (0.0ms) BEGIN
39540
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.759045"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.759045"]]
39541
+ TRANSACTION (0.3ms) COMMIT
39542
+ TRANSACTION (0.1ms) BEGIN
39543
+ SimpleWallet::Transaction::Credit Create (0.2ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 44], ["amount", 1000000], ["created_at", "2026-04-11 16:52:11.760086"], ["note", "AI income"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.760086"]]
39544
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
39545
+ SELECT COALESCE(SUM(amount), 0)
39546
+ FROM simple_wallet_transactions
39547
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39548
+ ),
39549
+ income = (
39550
+ SELECT COALESCE(SUM(amount), 0)
39551
+ FROM simple_wallet_transactions
39552
+ WHERE
39553
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39554
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39555
+ ),
39556
+ outcome = (
39557
+ SELECT COALESCE(SUM(amount), 0)
39558
+ FROM simple_wallet_transactions
39559
+ WHERE
39560
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39561
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39562
+ )
39563
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 44]]
39564
+ TRANSACTION (0.3ms) COMMIT
39565
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 44], ["LIMIT", 1]]
39566
+ TRANSACTION (0.0ms) BEGIN
39567
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.761916"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.761916"]]
39568
+ TRANSACTION (0.4ms) COMMIT
39569
+ SimpleWallet::Transaction Count (0.2ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 44]]
39570
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 45]]
39571
+ TRANSACTION (0.0ms) BEGIN
39572
+ SimpleWallet::Transaction::Debit Create (0.2ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 44], ["amount", -25], ["created_at", "2026-04-11 16:52:11.764006"], ["note", "Here is your alms."], ["pre_account_balance", 1000000], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Debit"], ["updated_at", "2026-04-11 16:52:11.764006"]]
39573
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
39574
+ SELECT COALESCE(SUM(amount), 0)
39575
+ FROM simple_wallet_transactions
39576
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39577
+ ),
39578
+ income = (
39579
+ SELECT COALESCE(SUM(amount), 0)
39580
+ FROM simple_wallet_transactions
39581
+ WHERE
39582
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39583
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39584
+ ),
39585
+ outcome = (
39586
+ SELECT COALESCE(SUM(amount), 0)
39587
+ FROM simple_wallet_transactions
39588
+ WHERE
39589
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39590
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39591
+ )
39592
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 44]]
39593
+ TRANSACTION (0.1ms) ROLLBACK
39594
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 45]]
39595
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 44]]
39596
+ TRANSACTION (0.0ms) BEGIN
39597
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.766308"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.766308"]]
39598
+ TRANSACTION (0.4ms) COMMIT
39599
+ TRANSACTION (0.0ms) BEGIN
39600
+ SimpleWallet::Transaction::Credit Create (0.2ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 46], ["amount", 100], ["created_at", "2026-04-11 16:52:11.767434"], ["note", "Bonus!"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.767434"]]
39601
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
39602
+ SELECT COALESCE(SUM(amount), 0)
39603
+ FROM simple_wallet_transactions
39604
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39605
+ ),
39606
+ income = (
39607
+ SELECT COALESCE(SUM(amount), 0)
39608
+ FROM simple_wallet_transactions
39609
+ WHERE
39610
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39611
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39612
+ ),
39613
+ outcome = (
39614
+ SELECT COALESCE(SUM(amount), 0)
39615
+ FROM simple_wallet_transactions
39616
+ WHERE
39617
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39618
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39619
+ )
39620
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 46]]
39621
+ TRANSACTION (0.3ms) COMMIT
39622
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 46], ["LIMIT", 1]]
39623
+ SimpleWallet::Account Load (0.0ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 46], ["LIMIT", 1]]
39624
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 46], ["LIMIT", 1]]
39625
+ TRANSACTION (0.0ms) BEGIN
39626
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.769910"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.769910"]]
39627
+ TRANSACTION (0.3ms) COMMIT
39628
+ TRANSACTION (0.1ms) BEGIN
39629
+ SimpleWallet::Transaction::Credit Create (0.2ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 47], ["amount", 100], ["created_at", "2026-04-11 16:52:11.770968"], ["note", "Bonus!"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.770968"]]
39630
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
39631
+ SELECT COALESCE(SUM(amount), 0)
39632
+ FROM simple_wallet_transactions
39633
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39634
+ ),
39635
+ income = (
39636
+ SELECT COALESCE(SUM(amount), 0)
39637
+ FROM simple_wallet_transactions
39638
+ WHERE
39639
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39640
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39641
+ ),
39642
+ outcome = (
39643
+ SELECT COALESCE(SUM(amount), 0)
39644
+ FROM simple_wallet_transactions
39645
+ WHERE
39646
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39647
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39648
+ )
39649
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 47]]
39650
+ TRANSACTION (0.4ms) COMMIT
39651
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 47], ["LIMIT", 1]]
39652
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 47]]
39653
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 47]]
39654
+ TRANSACTION (0.1ms) BEGIN
39655
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.773781"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.773781"]]
39656
+ TRANSACTION (0.3ms) COMMIT
39657
+ TRANSACTION (0.1ms) BEGIN
39658
+ SimpleWallet::Transaction::Credit Create (0.2ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 48], ["amount", 1000000], ["created_at", "2026-04-11 16:52:11.774872"], ["note", "AI income"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.774872"]]
39659
+ SimpleWallet::Account Update All (0.3ms) UPDATE "simple_wallet_accounts" SET balance = (
39660
+ SELECT COALESCE(SUM(amount), 0)
39661
+ FROM simple_wallet_transactions
39662
+ WHERE simple_wallet_transactions.account_id = simple_wallet_accounts.id
39663
+ ),
39664
+ income = (
39665
+ SELECT COALESCE(SUM(amount), 0)
39666
+ FROM simple_wallet_transactions
39667
+ WHERE
39668
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Credit'
39669
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39670
+ ),
39671
+ outcome = (
39672
+ SELECT COALESCE(SUM(amount), 0)
39673
+ FROM simple_wallet_transactions
39674
+ WHERE
39675
+ simple_wallet_transactions.type = 'SimpleWallet::Transaction::Debit'
39676
+ AND simple_wallet_transactions.account_id = simple_wallet_accounts.id
39677
+ )
39678
+ WHERE "simple_wallet_accounts"."id" = $1 [["id", 48]]
39679
+ TRANSACTION (0.3ms) COMMIT
39680
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 48], ["LIMIT", 1]]
39681
+ TRANSACTION (0.1ms) BEGIN
39682
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.776682"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.776682"]]
39683
+ TRANSACTION (0.4ms) COMMIT
39684
+ TRANSACTION (0.0ms) BEGIN
39685
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.778032"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.778032"]]
39686
+ TRANSACTION (0.3ms) COMMIT
39687
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 50], ["LIMIT", 1]]
39688
+ TRANSACTION (0.1ms) BEGIN
39689
+ SimpleWallet::Transaction::Credit Create (0.2ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 50], ["amount", 35], ["created_at", "2026-04-11 16:52:11.779464"], ["note", "My custom transaction note"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.779464"]]
39690
+ TRANSACTION (0.0ms) ROLLBACK
39691
+ SimpleWallet::Account Load (0.1ms) SELECT "simple_wallet_accounts".* FROM "simple_wallet_accounts" WHERE "simple_wallet_accounts"."id" = $1 LIMIT $2 [["id", 50], ["LIMIT", 1]]
39692
+ TRANSACTION (0.0ms) BEGIN
39693
+ SimpleWallet::Account Create (0.2ms) INSERT INTO "simple_wallet_accounts" ("balance", "created_at", "income", "outcome", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["balance", 0], ["created_at", "2026-04-11 16:52:11.780633"], ["income", 0], ["outcome", 0], ["updated_at", "2026-04-11 16:52:11.780633"]]
39694
+ TRANSACTION (0.3ms) COMMIT
39695
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 51]]
39696
+ TRANSACTION (0.1ms) BEGIN
39697
+ SimpleWallet::Transaction::Credit Create (0.2ms) INSERT INTO "simple_wallet_transactions" ("account_id", "amount", "created_at", "note", "pre_account_balance", "source_id", "source_type", "type", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["account_id", 51], ["amount", 35], ["created_at", "2026-04-11 16:52:11.782050"], ["note", "My custom transaction note"], ["pre_account_balance", 0], ["source_id", nil], ["source_type", nil], ["type", "SimpleWallet::Transaction::Credit"], ["updated_at", "2026-04-11 16:52:11.782050"]]
39698
+ TRANSACTION (0.0ms) ROLLBACK
39699
+ SimpleWallet::Transaction Count (0.1ms) SELECT COUNT(*) FROM "simple_wallet_transactions" WHERE "simple_wallet_transactions"."account_id" = $1 [["account_id", 51]]