Merge pull request #699 from gradido/apollo_community_calls

Apollo sendCoins via Login-Server
This commit is contained in:
einhornimmond 2021-08-06 10:43:57 +02:00 committed by GitHub
commit 4d2eb5b216
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,12 +23,14 @@ export class TransactionResolver {
): Promise<string> {
const payload = {
session_id: sessionId,
email,
amount,
target_email: email,
amount: amount * 10000,
memo,
auto_sign: true,
transaction_type: 'transfer',
blockchain_type: 'mysql',
}
const result = await apiPost(CONFIG.COMMUNITY_API_URL + 'sendCoins', payload)
const result = await apiPost(CONFIG.LOGIN_API_URL + 'createTransaction', payload)
if (!result.success) {
throw new Error(result.data)
}