remove crypto balance from backend
This commit is contained in:
@@ -9,10 +9,6 @@ module Mutations
|
||||
amount = BigDecimal(order[:amount])
|
||||
|
||||
ActiveRecord::Base.transaction do
|
||||
current_user
|
||||
.balance
|
||||
.withdrawal!(amount)
|
||||
|
||||
record = SellCryptoOrder.create!(
|
||||
paid_amount: amount,
|
||||
user_id: current_user.id,
|
||||
|
||||
@@ -9,10 +9,6 @@ module Mutations
|
||||
amount = BigDecimal(order[:amount])
|
||||
|
||||
ActiveRecord::Base.transaction do
|
||||
current_user
|
||||
.balance
|
||||
.withdrawal!(amount)
|
||||
|
||||
record = StakeOrder.create!(
|
||||
amount: amount,
|
||||
pool_name: order[:pool_name],
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
module Types
|
||||
class BalanceType < Types::BaseObject
|
||||
implements GraphQL::Types::Relay::Node
|
||||
global_id_field :id
|
||||
|
||||
graphql_name "Balance"
|
||||
|
||||
field :id, ID, null: false
|
||||
field :amount, String, null: false
|
||||
end
|
||||
end
|
||||
@@ -11,8 +11,6 @@ module Types
|
||||
field :first_name, String, null: false
|
||||
field :last_name, String, null: false
|
||||
field :wallet_address, String, null: true
|
||||
|
||||
field :balance, BalanceType, null: false
|
||||
field :fiat_balance, FiatBalanceType, null: false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,8 +6,6 @@ class XStakeSchema < GraphQL::Schema
|
||||
|
||||
def self.resolve_type(abstract_type, obj, ctx)
|
||||
case obj
|
||||
when Balance
|
||||
Types::BalanceType
|
||||
when FiatBalance
|
||||
Types::FiatBalanceType
|
||||
when SellCryptoOrder
|
||||
|
||||
Reference in New Issue
Block a user