Skip to content
Draft
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
35 changes: 35 additions & 0 deletions migration/1772303358000-AddRaiffeisenBankAssets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
module.exports = class AddRaiffeisenBankAssets1772303358000 {
name = 'AddRaiffeisenBankAssets1772303358000';

async up(queryRunner) {
// Insert Raiffeisen EUR asset
await queryRunner.query(`
SET IDENTITY_INSERT "dbo"."asset" ON;
INSERT INTO "dbo"."asset" ("id", "name", "type", "buyable", "sellable", "dexName", "category", "blockchain", "uniqueName", "comingSoon", "ikna", "cardBuyable", "cardSellable", "instantBuyable", "instantSellable", "financialType", "paymentEnabled", "amlRuleFrom", "amlRuleTo", "refundEnabled", "refEnabled")
VALUES (420, 'EUR', 'Custody', 0, 0, 'EUR', 'Private', 'Raiffeisen', 'Raiffeisen/EUR', 0, 0, 0, 0, 0, 0, 'EUR', 0, 0, 0, 1, 0);
SET IDENTITY_INSERT "dbo"."asset" OFF;
`);

// Insert Raiffeisen CHF asset
await queryRunner.query(`
SET IDENTITY_INSERT "dbo"."asset" ON;
INSERT INTO "dbo"."asset" ("id", "name", "type", "buyable", "sellable", "dexName", "category", "blockchain", "uniqueName", "comingSoon", "ikna", "cardBuyable", "cardSellable", "instantBuyable", "instantSellable", "financialType", "paymentEnabled", "amlRuleFrom", "amlRuleTo", "refundEnabled", "refEnabled")
VALUES (421, 'CHF', 'Custody', 0, 0, 'CHF', 'Private', 'Raiffeisen', 'Raiffeisen/CHF', 0, 0, 0, 0, 0, 0, 'CHF', 0, 0, 0, 1, 0);
SET IDENTITY_INSERT "dbo"."asset" OFF;
`);

// Link bank 12 (Raiffeisen EUR) to asset 420
await queryRunner.query(`UPDATE "dbo"."bank" SET "assetId" = 420 WHERE "id" = 12`);

// Link bank 13 (Raiffeisen CHF) to asset 421
await queryRunner.query(`UPDATE "dbo"."bank" SET "assetId" = 421 WHERE "id" = 13`);
}

async down(queryRunner) {
// Unlink banks
await queryRunner.query(`UPDATE "dbo"."bank" SET "assetId" = NULL WHERE "id" IN (12, 13)`);

// Remove Raiffeisen assets
await queryRunner.query(`DELETE FROM "dbo"."asset" WHERE "id" IN (420, 421)`);
}
};
2 changes: 2 additions & 0 deletions migration/seed/asset.csv
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,6 @@ id,name,type,buyable,sellable,chainId,sellCommand,dexName,category,blockchain,un
113,BTC,Coin,TRUE,TRUE,,,BTC,Public,Bitcoin,Bitcoin/BTC,Bitcoin,FALSE,,87278.97353,FALSE,11,68819.65463,FALSE,FALSE,FALSE,FALSE,BTC,,TRUE,0,0,74099.1069,TRUE
112,BNB,Coin,TRUE,TRUE,0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c,,BNB,Public,BinanceSmartChain,BinanceSmartChain/BNB,Binance Coin,FALSE,601,833.1583387,FALSE,36,656.9471065,FALSE,FALSE,FALSE,FALSE,Other,18,FALSE,0,0,707.34435,TRUE
111,ETH,Coin,TRUE,TRUE,0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2,,ETH,Public,Ethereum,Ethereum/ETH,Ether,FALSE,1,2922.079246,FALSE,6,2304.065646,FALSE,FALSE,FALSE,FALSE,Other,18,TRUE,0,0,2480.82045,TRUE
420,EUR,Custody,FALSE,FALSE,,,EUR,Private,Raiffeisen,Raiffeisen/EUR,,FALSE,,1.17786809,FALSE,39,0.9287514723,FALSE,FALSE,FALSE,FALSE,EUR,,FALSE,0,0,1,TRUE
421,CHF,Custody,FALSE,FALSE,,,CHF,Private,Raiffeisen,Raiffeisen/CHF,,FALSE,,1.268227427,FALSE,37,1,FALSE,FALSE,FALSE,FALSE,CHF,,FALSE,0,0,1.076714309,TRUE
409,FIRO,Coin,TRUE,TRUE,,,FIRO,Public,Firo,Firo/FIRO,,FALSE,,1.5,FALSE,,1.35,FALSE,FALSE,FALSE,FALSE,Other,8,FALSE,0,0,1.4,TRUE
5 changes: 2 additions & 3 deletions migration/seed/bank.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
id,updated,created,name,iban,bic,currency,receive,send,sctInst,amlEnabled,assetId
16,2025-12-05 14:27:39,2025-12-05 14:27:39,Yapeal,CH6783019DFXEUR000002,YAPECHZ2,EUR,TRUE,TRUE,FALSE,TRUE,405
15,2025-12-05 14:27:39,2025-12-05 14:27:39,Yapeal,CH5283019DFXCHF000001,YAPECHZ2,CHF,TRUE,TRUE,FALSE,TRUE,404
14,2025-09-10 23:30:56,2025-09-10 23:30:56,Maerki Baumann,LU116060002000005040,OLKILUL1,EUR,FALSE,FALSE,FALSE,TRUE,
13,2025-09-10 23:30:07,2025-09-10 23:30:07,Maerki Baumann,CH4880808002186504370,RAIFCH22,CHF,FALSE,FALSE,FALSE,TRUE,
12,2025-09-10 23:30:07,2025-09-10 23:30:07,Maerki Baumann,CH7780808002608614092,RAIFCH22,EUR,FALSE,FALSE,FALSE,TRUE,
13,2025-09-10 23:30:07,2025-09-10 23:30:07,Raiffeisen,CH4880808002186504370,RAIFCH22,CHF,FALSE,FALSE,FALSE,TRUE,421
12,2025-09-10 23:30:07,2025-09-10 23:30:07,Raiffeisen,CH7780808002608614092,RAIFCH22,EUR,FALSE,FALSE,FALSE,TRUE,420
8,2025-09-10 23:30:06,2025-09-10 23:30:06,Maerki Baumann,CH3808573109968202333,MAEBCHZZ,USD,FALSE,FALSE,FALSE,TRUE,
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ export enum Blockchain {
CHECKOUT = 'Checkout',
SUMIXX = 'Sumixx',
YAPEAL = 'Yapeal',
RAIFFEISEN = 'Raiffeisen',
}
2 changes: 2 additions & 0 deletions src/integration/blockchain/shared/util/blockchain.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ const BlockchainExplorerUrls: { [b in Blockchain]: string } = {
[Blockchain.CHECKOUT]: undefined,
[Blockchain.SUMIXX]: undefined,
[Blockchain.YAPEAL]: undefined,
[Blockchain.RAIFFEISEN]: undefined,
};

const TxPaths: { [b in Blockchain]: string } = {
Expand Down Expand Up @@ -140,6 +141,7 @@ const TxPaths: { [b in Blockchain]: string } = {
[Blockchain.CHECKOUT]: undefined,
[Blockchain.SUMIXX]: undefined,
[Blockchain.YAPEAL]: undefined,
[Blockchain.RAIFFEISEN]: undefined,
};

function assetPaths(asset: Asset): string | undefined {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ export class TestExchangeService extends ExchangeService {
Checkout: undefined,
Sumixx: undefined,
Yapeal: undefined,
Raiffeisen: undefined,
};
}
1 change: 1 addition & 0 deletions src/integration/exchange/services/binance.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class BinanceService extends ExchangeService {
Checkout: undefined,
Sumixx: undefined,
Yapeal: undefined,
Raiffeisen: undefined,
};

constructor() {
Expand Down
1 change: 1 addition & 0 deletions src/integration/exchange/services/bitstamp.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class BitstampService extends ExchangeService {
Checkout: undefined,
Sumixx: undefined,
Yapeal: undefined,
Raiffeisen: undefined,
};

constructor() {
Expand Down
1 change: 1 addition & 0 deletions src/integration/exchange/services/kraken.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export class KrakenService extends ExchangeService {
Checkout: undefined,
Sumixx: undefined,
Yapeal: undefined,
Raiffeisen: undefined,
};

@Inject() private readonly settingService: SettingService;
Expand Down
1 change: 1 addition & 0 deletions src/integration/exchange/services/kucoin.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class KucoinService extends ExchangeService {
Checkout: undefined,
Sumixx: undefined,
Yapeal: undefined,
Raiffeisen: undefined,
};

constructor() {
Expand Down
1 change: 1 addition & 0 deletions src/integration/exchange/services/mexc.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export class MexcService extends ExchangeService {
Checkout: undefined,
Sumixx: undefined,
Yapeal: undefined,
Raiffeisen: undefined,
};

constructor(private readonly http: HttpService) {
Expand Down
1 change: 1 addition & 0 deletions src/integration/exchange/services/xt.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class XtService extends ExchangeService {
Checkout: undefined,
Sumixx: undefined,
Yapeal: undefined,
Raiffeisen: undefined,
};

constructor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ export class BuyCrypto extends IEntity {
case Blockchain.MAERKI_BAUMANN:
case Blockchain.OLKYPAY:
case Blockchain.YAPEAL:
case Blockchain.RAIFFEISEN:
return BankService.isBankMatching(asset, this.bankTx?.accountIban) ? this.inputReferenceAmount : 0;

case Blockchain.CHECKOUT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const PayoutLimits: { [k in Blockchain]: number } = {
[Blockchain.CHECKOUT]: undefined,
[Blockchain.SUMIXX]: undefined,
[Blockchain.YAPEAL]: undefined,
[Blockchain.RAIFFEISEN]: undefined,
};

@Injectable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export class BankTxRepeat extends IEntity {
case Blockchain.MAERKI_BAUMANN:
case Blockchain.OLKYPAY:
case Blockchain.YAPEAL:
case Blockchain.RAIFFEISEN:
return BankService.isBankMatching(asset, this.bankTx.accountIban) ? this.bankTx.amount : 0;

default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export class BankTxReturn extends IEntity {
case Blockchain.MAERKI_BAUMANN:
case Blockchain.OLKYPAY:
case Blockchain.YAPEAL:
case Blockchain.RAIFFEISEN:
return BankService.isBankMatching(asset, this.bankTx.accountIban) ? this.bankTx.amount : 0;

default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ export class BankTx extends IEntity {
case Blockchain.MAERKI_BAUMANN:
case Blockchain.OLKYPAY:
case Blockchain.YAPEAL:
case Blockchain.RAIFFEISEN:
return BankService.isBankMatching(asset, this.accountIban) ? this.amount : 0;

default:
Expand Down
2 changes: 2 additions & 0 deletions src/subdomains/supporting/bank/bank/bank.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ export class BankService implements OnModuleInit {
return IbanBankName.OLKY;
case Blockchain.YAPEAL:
return IbanBankName.YAPEAL;
case Blockchain.RAIFFEISEN:
return IbanBankName.RAIFFEISEN;
default:
return undefined;
}
Expand Down
Loading