mirror of
https://github.com/valitydev/daway.git
synced 2024-11-06 08:35:23 +00:00
OPS-77: bump ff proto (#42)
This commit is contained in:
parent
d7364aeac3
commit
ad9a772d2f
7
pom.xml
7
pom.xml
@ -127,7 +127,7 @@
|
||||
<dependency>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>payout-manager-proto</artifactId>
|
||||
<version>1.35-dbed280</version>
|
||||
<version>1.36-063163d</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dev.vality</groupId>
|
||||
@ -154,12 +154,12 @@
|
||||
<dependency>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>fistful-proto</artifactId>
|
||||
<version>1.144-ea0fe7a</version>
|
||||
<version>1.145-c45166d</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>xrates-proto</artifactId>
|
||||
<version>1.22-4adcd9c</version>
|
||||
<version>1.23-bf0d62d</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dev.vality</groupId>
|
||||
@ -176,7 +176,6 @@
|
||||
<dependency>
|
||||
<groupId>dev.vality</groupId>
|
||||
<artifactId>mamsel</artifactId>
|
||||
<version>0.2.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Test -->
|
||||
|
@ -81,12 +81,9 @@ public class DestinationCreatedHandler implements DestinationHandler {
|
||||
}
|
||||
} else if (resource.isSetCryptoWallet()) {
|
||||
ResourceCryptoWallet resourceCryptoWallet = resource.getCryptoWallet();
|
||||
CryptoWallet wallet = resourceCryptoWallet.getCryptoWallet();
|
||||
destination.setResourceCryptoWalletId(wallet.getId());
|
||||
destination.setResourceCryptoWalletType(wallet.getCurrency().name());
|
||||
if (wallet.isSetData()) {
|
||||
destination.setResourceCryptoWalletData(wallet.getData().getSetField().getFieldName());
|
||||
}
|
||||
var cryptoWallet = resourceCryptoWallet.getCryptoWallet();
|
||||
destination.setResourceCryptoWalletId(cryptoWallet.getId());
|
||||
destination.setResourceCryptoWalletType(cryptoWallet.getCurrency().getId());
|
||||
} else if (resource.isSetDigitalWallet()) {
|
||||
ResourceDigitalWallet resourceDigitalWallet = resource.getDigitalWallet();
|
||||
DigitalWallet digitalWallet = resourceDigitalWallet.getDigitalWallet();
|
||||
|
@ -11,7 +11,6 @@ import dev.vality.geck.filter.PathConditionFilter;
|
||||
import dev.vality.geck.filter.condition.IsNullCondition;
|
||||
import dev.vality.geck.filter.rule.PathConditionRule;
|
||||
import dev.vality.machinegun.eventsink.MachineEvent;
|
||||
import dev.vality.mamsel.PaymentSystemUtil;
|
||||
import dev.vality.newway.dao.withdrawal.session.iface.WithdrawalSessionDao;
|
||||
import dev.vality.newway.domain.enums.BankCardPaymentSystem;
|
||||
import dev.vality.newway.domain.enums.DestinationResourceType;
|
||||
@ -23,6 +22,8 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@ -65,7 +66,7 @@ public class WithdrawalSessionCreatedHandler implements WithdrawalSessionHandler
|
||||
withdrawalSession.setDestinationCardMaskedPan(bankCard.getMaskedPan());
|
||||
if (bankCard.isSetPaymentSystem()) {
|
||||
withdrawalSession.setDestinationCardPaymentSystem(
|
||||
BankCardPaymentSystem.valueOf(PaymentSystemUtil.getFistfulPaymentSystemName(bankCard)));
|
||||
BankCardPaymentSystem.valueOf(bankCard.getPaymentSystem().getId().toLowerCase(Locale.ROOT)));
|
||||
}
|
||||
withdrawalSession.setResourceBankCardBankName(bankCard.getBankName());
|
||||
if (bankCard.isSetIssuerCountry()) {
|
||||
@ -76,12 +77,9 @@ public class WithdrawalSessionCreatedHandler implements WithdrawalSessionHandler
|
||||
}
|
||||
} else if (resource.isSetCryptoWallet()) {
|
||||
ResourceCryptoWallet resourceCryptoWallet = resource.getCryptoWallet();
|
||||
CryptoWallet cryptoWallet = resourceCryptoWallet.getCryptoWallet();
|
||||
var cryptoWallet = resourceCryptoWallet.getCryptoWallet();
|
||||
withdrawalSession.setResourceCryptoWalletId(cryptoWallet.getId());
|
||||
withdrawalSession.setResourceCryptoWalletType(cryptoWallet.getCurrency().toString());
|
||||
if (cryptoWallet.isSetData()) {
|
||||
withdrawalSession.setResourceCryptoWalletData(cryptoWallet.getData().getSetField().getFieldName());
|
||||
}
|
||||
withdrawalSession.setResourceCryptoWalletType(cryptoWallet.getCurrency().getId());
|
||||
} else if (resource.isSetDigitalWallet()) {
|
||||
ResourceDigitalWallet resourceDigitalWallet = resource.getDigitalWallet();
|
||||
DigitalWallet digitalWallet = resourceDigitalWallet.getDigitalWallet();
|
||||
|
@ -49,7 +49,7 @@ public class DestinationCreatedCryptoWalletHandlerTest {
|
||||
new RecordRowMapper<>(DESTINATION, Destination.class));
|
||||
|
||||
Assertions.assertNotNull(Objects.requireNonNull(destinationResult).getResourceCryptoWalletId());
|
||||
Assertions.assertNotNull(destinationResult.getResourceCryptoWalletData());
|
||||
Assertions.assertNotNull(destinationResult.getResourceCryptoWalletType());
|
||||
}
|
||||
|
||||
}
|
@ -48,7 +48,7 @@ public class WithdrawalSessionCreatedCryptoWalletHandlerTest {
|
||||
new RecordRowMapper<>(WITHDRAWAL_SESSION, WithdrawalSession.class));
|
||||
|
||||
Assertions.assertNotNull(Objects.requireNonNull(result).getResourceCryptoWalletId());
|
||||
Assertions.assertNotNull(result.getResourceCryptoWalletData());
|
||||
Assertions.assertNotNull(result.getResourceCryptoWalletType());
|
||||
}
|
||||
|
||||
}
|
@ -44,8 +44,7 @@ public class DestinationHandlerTestUtils {
|
||||
public static CryptoWallet createFistfulCryptoWallet() {
|
||||
CryptoWallet cryptoWallet = new CryptoWallet();
|
||||
cryptoWallet.setId(CRYPTO_WALLET_ID);
|
||||
cryptoWallet.setData(CryptoData.bitcoin(new CryptoDataBitcoin()));
|
||||
cryptoWallet.setCurrency(CryptoCurrency.bitcoin);
|
||||
cryptoWallet.setCurrency(new CryptoCurrencyRef("bitcoin"));
|
||||
return cryptoWallet;
|
||||
}
|
||||
|
||||
|
@ -47,8 +47,7 @@ public class WithdrawalSessionCreatedHandlerUtils {
|
||||
public static CryptoWallet createFistfulCryptoWallet() {
|
||||
CryptoWallet cryptoWallet = new CryptoWallet();
|
||||
cryptoWallet.setId(CRYPTO_WALLET_ID);
|
||||
cryptoWallet.setData(CryptoData.bitcoin(new CryptoDataBitcoin()));
|
||||
cryptoWallet.setCurrency(CryptoCurrency.bitcoin);
|
||||
cryptoWallet.setCurrency(new CryptoCurrencyRef("bitcoin"));
|
||||
return cryptoWallet;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user