remove currency model and all references
This commit is contained in:
@@ -8,10 +8,5 @@ module Types
|
||||
|
||||
field :id, ID, null: false
|
||||
field :amount, String, null: false
|
||||
|
||||
field :currency, CurrencyType, null: false
|
||||
def currency
|
||||
dataloader.with(Dataloader::Source, Currency).load(object.currency_id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -7,12 +7,6 @@ module Types
|
||||
graphql_name "BuyCryptoOrder"
|
||||
|
||||
field :id, ID, null: false
|
||||
|
||||
field :currency, CurrencyType, null: false
|
||||
def currency
|
||||
dataloader.with(Dataloader::Source, Currency).load(object.currency_id)
|
||||
end
|
||||
|
||||
field :status, ProcessStatusEnum, null: false
|
||||
field :paid_amount_cents, Integer, null: false
|
||||
field :received_amount, String, null: true
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
# frozen_string_literal: true
|
||||
module Types
|
||||
class CurrencyType < Types::BaseObject
|
||||
implements GraphQL::Types::Relay::Node
|
||||
global_id_field :id
|
||||
|
||||
graphql_name "Currency"
|
||||
|
||||
field :id, ID, null: false
|
||||
field :name, String, null: false
|
||||
end
|
||||
end
|
||||
@@ -10,16 +10,6 @@ module Types
|
||||
context[:current_user]
|
||||
end
|
||||
|
||||
field :balances, BalanceType.connection_type, null: false
|
||||
def balances
|
||||
Pundit.policy_scope(current_user, Balance)
|
||||
end
|
||||
|
||||
field :fiat_balances, FiatBalanceType.connection_type, null: false
|
||||
def fiat_balances
|
||||
Pundit.policy_scope(current_user, FiatBalance)
|
||||
end
|
||||
|
||||
field :sell_crypto_orders, SellCryptoOrderType.connection_type, null: false
|
||||
def sell_crypto_orders
|
||||
Pundit.policy_scope(current_user, SellCryptoOrder)
|
||||
|
||||
@@ -7,12 +7,6 @@ module Types
|
||||
graphql_name "SellCryptoOrder"
|
||||
|
||||
field :id, ID, null: false
|
||||
|
||||
field :currency, CurrencyType, null: false
|
||||
def currency
|
||||
dataloader.with(Dataloader::Source, Currency).load(object.currency_id)
|
||||
end
|
||||
|
||||
field :status, ProcessStatusEnum, null: false
|
||||
field :paid_amount, String, null: false
|
||||
field :received_amount_cents, Integer, null: true
|
||||
|
||||
@@ -11,5 +11,8 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user