Remove directReceive setting (#2230)
* Remove directReceive setting * Keep directReceive in typedef for backward compatibility
This commit is contained in:
parent
089fe4d57b
commit
acf042f06e
@ -16,7 +16,6 @@ export async function getCost ({ msats }) {
|
|||||||
|
|
||||||
export async function getInvoiceablePeer (_, { me, models, cost, paymentMethod }) {
|
export async function getInvoiceablePeer (_, { me, models, cost, paymentMethod }) {
|
||||||
if (paymentMethod === PAID_ACTION_PAYMENT_METHODS.P2P && !me?.proxyReceive) return null
|
if (paymentMethod === PAID_ACTION_PAYMENT_METHODS.P2P && !me?.proxyReceive) return null
|
||||||
if (paymentMethod === PAID_ACTION_PAYMENT_METHODS.DIRECT && !me?.directReceive) return null
|
|
||||||
|
|
||||||
const wallets = await getInvoiceableWallets(me.id, { models })
|
const wallets = await getInvoiceableWallets(me.id, { models })
|
||||||
if (wallets.length === 0) {
|
if (wallets.length === 0) {
|
||||||
|
@ -125,7 +125,6 @@ export default gql`
|
|||||||
wildWestMode: Boolean!
|
wildWestMode: Boolean!
|
||||||
withdrawMaxFeeDefault: Int!
|
withdrawMaxFeeDefault: Int!
|
||||||
proxyReceive: Boolean
|
proxyReceive: Boolean
|
||||||
directReceive: Boolean
|
|
||||||
receiveCreditsBelowSats: Int!
|
receiveCreditsBelowSats: Int!
|
||||||
sendCreditsBelowSats: Int!
|
sendCreditsBelowSats: Int!
|
||||||
}
|
}
|
||||||
@ -209,7 +208,7 @@ export default gql`
|
|||||||
vaultKeyHash: String
|
vaultKeyHash: String
|
||||||
walletsUpdatedAt: Date
|
walletsUpdatedAt: Date
|
||||||
proxyReceive: Boolean
|
proxyReceive: Boolean
|
||||||
directReceive: Boolean
|
directReceive: Boolean @deprecated
|
||||||
receiveCreditsBelowSats: Int!
|
receiveCreditsBelowSats: Int!
|
||||||
sendCreditsBelowSats: Int!
|
sendCreditsBelowSats: Int!
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,6 @@ ${STREAK_FIELDS}
|
|||||||
vaultKeyHash
|
vaultKeyHash
|
||||||
walletsUpdatedAt
|
walletsUpdatedAt
|
||||||
proxyReceive
|
proxyReceive
|
||||||
directReceive
|
|
||||||
}
|
}
|
||||||
optional {
|
optional {
|
||||||
isContributor
|
isContributor
|
||||||
@ -117,7 +116,6 @@ export const SETTINGS_FIELDS = gql`
|
|||||||
}
|
}
|
||||||
apiKeyEnabled
|
apiKeyEnabled
|
||||||
proxyReceive
|
proxyReceive
|
||||||
directReceive
|
|
||||||
receiveCreditsBelowSats
|
receiveCreditsBelowSats
|
||||||
sendCreditsBelowSats
|
sendCreditsBelowSats
|
||||||
}
|
}
|
||||||
|
@ -160,7 +160,6 @@ export default function Settings ({ ssrData }) {
|
|||||||
hideIsContributor: settings?.hideIsContributor,
|
hideIsContributor: settings?.hideIsContributor,
|
||||||
noReferralLinks: settings?.noReferralLinks,
|
noReferralLinks: settings?.noReferralLinks,
|
||||||
proxyReceive: settings?.proxyReceive,
|
proxyReceive: settings?.proxyReceive,
|
||||||
directReceive: settings?.directReceive,
|
|
||||||
receiveCreditsBelowSats: settings?.receiveCreditsBelowSats,
|
receiveCreditsBelowSats: settings?.receiveCreditsBelowSats,
|
||||||
sendCreditsBelowSats: settings?.sendCreditsBelowSats
|
sendCreditsBelowSats: settings?.sendCreditsBelowSats
|
||||||
}}
|
}}
|
||||||
@ -367,22 +366,6 @@ export default function Settings ({ ssrData }) {
|
|||||||
name='proxyReceive'
|
name='proxyReceive'
|
||||||
groupClassName='mb-0'
|
groupClassName='mb-0'
|
||||||
/>
|
/>
|
||||||
<Checkbox
|
|
||||||
label={
|
|
||||||
<div className='d-flex align-items-center'>directly deposit to attached wallets
|
|
||||||
<Info>
|
|
||||||
<ul>
|
|
||||||
<li>Directly deposit to your attached wallets if they cause your balance to exceed your auto-withdraw threshold</li>
|
|
||||||
<li>Senders will be able to see your wallet's lightning node public key</li>
|
|
||||||
<li>If 'proxy deposits' is also checked, it will take precedence and direct deposits will only be used as a fallback</li>
|
|
||||||
<li>Because we can't determine if a payment succeeds, you won't be notified about direct deposits</li>
|
|
||||||
</ul>
|
|
||||||
</Info>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
name='directReceive'
|
|
||||||
groupClassName='mb-0'
|
|
||||||
/>
|
|
||||||
<Checkbox
|
<Checkbox
|
||||||
label={
|
label={
|
||||||
<div className='d-flex align-items-center'>hide invoice descriptions
|
<div className='d-flex align-items-center'>hide invoice descriptions
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- You are about to drop the column `directReceive` on the `users` table. All the data in the column will be lost.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "users" DROP COLUMN "directReceive";
|
@ -148,7 +148,6 @@ model User {
|
|||||||
walletsUpdatedAt DateTime?
|
walletsUpdatedAt DateTime?
|
||||||
vaultEntries VaultEntry[] @relation("VaultEntries")
|
vaultEntries VaultEntry[] @relation("VaultEntries")
|
||||||
proxyReceive Boolean @default(true)
|
proxyReceive Boolean @default(true)
|
||||||
directReceive Boolean @default(true)
|
|
||||||
DirectPaymentReceived DirectPayment[] @relation("DirectPaymentReceived")
|
DirectPaymentReceived DirectPayment[] @relation("DirectPaymentReceived")
|
||||||
DirectPaymentSent DirectPayment[] @relation("DirectPaymentSent")
|
DirectPaymentSent DirectPayment[] @relation("DirectPaymentSent")
|
||||||
UserSubTrust UserSubTrust[]
|
UserSubTrust UserSubTrust[]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user