-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(user): transfer a wallet from anonymous user to a logged in one
if the least doesn't have any yet refs #247
- Loading branch information
1 parent
fd92d15
commit edf3d3a
Showing
17 changed files
with
447 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ALTER TABLE "user_wallets" ADD COLUMN "created_at" timestamp DEFAULT now();--> statement-breakpoint | ||
ALTER TABLE "user_wallets" ADD COLUMN "updated_at" timestamp DEFAULT now();--> statement-breakpoint | ||
ALTER TABLE "userSetting" ADD COLUMN "created_at" timestamp DEFAULT now(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
{ | ||
"id": "43dc008c-31b1-4d9b-871f-21b6991441cc", | ||
"prevId": "68facf51-a439-434a-a0c7-1e9c258d57df", | ||
"version": "7", | ||
"dialect": "postgresql", | ||
"tables": { | ||
"public.user_wallets": { | ||
"name": "user_wallets", | ||
"schema": "", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "serial", | ||
"primaryKey": true, | ||
"notNull": true | ||
}, | ||
"user_id": { | ||
"name": "user_id", | ||
"type": "uuid", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"address": { | ||
"name": "address", | ||
"type": "varchar", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"stripe_customer_id": { | ||
"name": "stripe_customer_id", | ||
"type": "varchar", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"deployment_allowance": { | ||
"name": "deployment_allowance", | ||
"type": "numeric(10, 2)", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"default": "'0.00'" | ||
}, | ||
"fee_allowance": { | ||
"name": "fee_allowance", | ||
"type": "numeric(10, 2)", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"default": "'0.00'" | ||
}, | ||
"trial": { | ||
"name": "trial", | ||
"type": "boolean", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"default": true | ||
}, | ||
"created_at": { | ||
"name": "created_at", | ||
"type": "timestamp", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"default": "now()" | ||
}, | ||
"updated_at": { | ||
"name": "updated_at", | ||
"type": "timestamp", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"default": "now()" | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": { | ||
"user_wallets_user_id_userSetting_id_fk": { | ||
"name": "user_wallets_user_id_userSetting_id_fk", | ||
"tableFrom": "user_wallets", | ||
"tableTo": "userSetting", | ||
"columnsFrom": [ | ||
"user_id" | ||
], | ||
"columnsTo": [ | ||
"id" | ||
], | ||
"onDelete": "no action", | ||
"onUpdate": "no action" | ||
} | ||
}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": { | ||
"user_wallets_user_id_unique": { | ||
"name": "user_wallets_user_id_unique", | ||
"nullsNotDistinct": false, | ||
"columns": [ | ||
"user_id" | ||
] | ||
}, | ||
"user_wallets_address_unique": { | ||
"name": "user_wallets_address_unique", | ||
"nullsNotDistinct": false, | ||
"columns": [ | ||
"address" | ||
] | ||
} | ||
} | ||
}, | ||
"public.userSetting": { | ||
"name": "userSetting", | ||
"schema": "", | ||
"columns": { | ||
"id": { | ||
"name": "id", | ||
"type": "uuid", | ||
"primaryKey": true, | ||
"notNull": true, | ||
"default": "uuid_generate_v4()" | ||
}, | ||
"userId": { | ||
"name": "userId", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"username": { | ||
"name": "username", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"email": { | ||
"name": "email", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"emailVerified": { | ||
"name": "emailVerified", | ||
"type": "boolean", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"default": false | ||
}, | ||
"stripeCustomerId": { | ||
"name": "stripeCustomerId", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"bio": { | ||
"name": "bio", | ||
"type": "text", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"subscribedToNewsletter": { | ||
"name": "subscribedToNewsletter", | ||
"type": "boolean", | ||
"primaryKey": false, | ||
"notNull": true, | ||
"default": false | ||
}, | ||
"youtubeUsername": { | ||
"name": "youtubeUsername", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"twitterUsername": { | ||
"name": "twitterUsername", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"githubUsername": { | ||
"name": "githubUsername", | ||
"type": "varchar(255)", | ||
"primaryKey": false, | ||
"notNull": false | ||
}, | ||
"created_at": { | ||
"name": "created_at", | ||
"type": "timestamp", | ||
"primaryKey": false, | ||
"notNull": false, | ||
"default": "now()" | ||
} | ||
}, | ||
"indexes": {}, | ||
"foreignKeys": {}, | ||
"compositePrimaryKeys": {}, | ||
"uniqueConstraints": { | ||
"userSetting_userId_unique": { | ||
"name": "userSetting_userId_unique", | ||
"nullsNotDistinct": false, | ||
"columns": [ | ||
"userId" | ||
] | ||
}, | ||
"userSetting_username_unique": { | ||
"name": "userSetting_username_unique", | ||
"nullsNotDistinct": false, | ||
"columns": [ | ||
"username" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"enums": {}, | ||
"schemas": {}, | ||
"_meta": { | ||
"columns": {}, | ||
"schemas": {}, | ||
"tables": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
AkashSandboxDatabaseCS=postgres://postgres:password@localhost:5432/console-akash-sandbox | ||
UserDatabaseCS=postgres://postgres:password@localhost:5432/console-users | ||
POSTGRES_DB_URI=postgres://postgres:password@localhost:5432/console-users | ||
MASTER_WALLET_MNEMONIC="motion isolate mother convince snack twenty tumble boost elbow bundle modify balcony" | ||
NETWORK=sandbox | ||
POSTGRES_DB_URI=postgres://postgres:[email protected]:5432/console-users | ||
RPC_NODE_ENDPOINT=https://rpc.sandbox-01.aksh.pw:443 | ||
TRIAL_DEPLOYMENT_ALLOWANCE_AMOUNT=20000000 | ||
DEPLOYMENT_ALLOWANCE_REFILL_AMOUNT=20000000 | ||
DEPLOYMENT_ALLOWANCE_REFILL_THRESHOLD=2000000 | ||
TRIAL_FEES_ALLOWANCE_AMOUNT=5000000 | ||
FEE_ALLOWANCE_REFILL_AMOUNT=5000000 | ||
FEE_ALLOWANCE_REFILL_THRESHOLD=500000 | ||
DEPLOYMENT_GRANT_DENOM=ibc/12C6A0C374171B595A0A9E18B83FA09D295FB1F2D8C6DAA3AC28683471752D84 | ||
DEPLOYMENT_GRANT_DENOM=uakt | ||
LOG_LEVEL=debug | ||
BILLING_ENABLED=true | ||
ANONYMOUS_USER_TOKEN_SECRET=ANONYMOUS_USER_TOKEN_SECRET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.