Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions antispam/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,6 @@ func (i *Integration) AllowDistribution(_ context.Context, _ *ocp_common.Account
}

func (i *Integration) AllowSwap(_ context.Context, _ swap.Kind, _ swap.FundingSource, _, _, _ *ocp_common.Account, swapAmount, feeAmount uint64, initializesMint bool) (bool, string, error) {
if !initializesMint {
return true, "", nil
}

if swapAmount != account.DefaultNewCurrencyPurchaseAmount {
return false, "invalid initial purchase amount for currency launch", nil
}

if feeAmount != account.DefaultNewCurrencyFeeAmount {
return false, "invalid fee amount for currency launch", nil
}

return true, "", nil
}

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ require (
github.com/aws/smithy-go v1.27.1
github.com/buckket/go-blurhash v1.1.0
github.com/code-payments/flipcash2-protobuf-api v1.16.0
github.com/code-payments/ocp-protobuf-api v1.13.2-0.20260610171241-de46af911053
github.com/code-payments/ocp-server v1.20.0
github.com/code-payments/ocp-protobuf-api v1.14.0
github.com/code-payments/ocp-server v1.20.1-0.20260710131716-f60d692f1340
github.com/devsisters/go-applereceipt v0.0.0-20240805020915-fa22a0160fc2
github.com/forPelevin/gomoji v1.4.1
github.com/georgysavva/scany/v2 v2.1.4
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ github.com/code-payments/code-vm-indexer v1.2.0 h1:rSHpBMiT9BKgmKcXg/VIoi/h0t7jN
github.com/code-payments/code-vm-indexer v1.2.0/go.mod h1:vn91YN2qNqb+gGJeZe2+l+TNxVmEEiRHXXnIn2Y40h8=
github.com/code-payments/flipcash2-protobuf-api v1.16.0 h1:EtSXEfWxCjmWDkz+CWzEeEdgAStkN8TLskaTfJN4VpM=
github.com/code-payments/flipcash2-protobuf-api v1.16.0/go.mod h1:s/1pOsb4FTRD+LcvRKGjfmm6ygRS/m1ep34EIW0fuDs=
github.com/code-payments/ocp-protobuf-api v1.13.2-0.20260610171241-de46af911053 h1:0B96K7/z7TpFbAJeyzP43A0eM58Ie/KRuu5U6PUrses=
github.com/code-payments/ocp-protobuf-api v1.13.2-0.20260610171241-de46af911053/go.mod h1:tw6BooY5a8l6CtSZnKOruyKII0W04n89pcM4BizrgG8=
github.com/code-payments/ocp-server v1.20.0 h1:8tsKUNsODfBUaUANO1iLd9nqVocd9TiP4KF+CAi2CBI=
github.com/code-payments/ocp-server v1.20.0/go.mod h1:C/yDoEdhbOb/F3SyWicRiKsonB4sDjkVTUGRDQxlf2Y=
github.com/code-payments/ocp-protobuf-api v1.14.0 h1:Q0IqyF4q31Mf+wvOILz+BM6P+xOnrPVAm/85/YolKDk=
github.com/code-payments/ocp-protobuf-api v1.14.0/go.mod h1:tw6BooY5a8l6CtSZnKOruyKII0W04n89pcM4BizrgG8=
github.com/code-payments/ocp-server v1.20.1-0.20260710131716-f60d692f1340 h1:qfopb0uxuqg6Bs/7frHf5avtSU5i99aEA7ka8692GH4=
github.com/code-payments/ocp-server v1.20.1-0.20260710131716-f60d692f1340/go.mod h1:sPxPVMAxXMRSxCgTNOsmBvLUoitBekR4nx4Hl7YXvJg=
github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8=
github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
Expand Down
5 changes: 1 addition & 4 deletions swap/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ func (i *Integration) OnSwapSubmitted(ctx context.Context, owner *common.Account
return nil
}

func (i *Integration) OnSwapFinalized(ctx context.Context, owner *ocp_common.Account, isBuy bool, mint *ocp_common.Account, currencyName string, region ocp_currency_lib.Code, amountReceived float64, isMintInit bool) error {
if isMintInit {
return nil
}
func (i *Integration) OnSwapFinalized(ctx context.Context, owner *ocp_common.Account, isBuy bool, mint *ocp_common.Account, currencyName string, region ocp_currency_lib.Code, amountReceived float64) error {
i.notifyCurrencyBoughtOrSold(ctx, owner, isBuy, mint, currencyName, region, amountReceived)
if isBuy && i.enableGainPushes {
i.notifyHoldersOfGain(ctx, mint, currencyName, owner)
Expand Down
Loading