@@ -106,7 +106,6 @@ contract SwapPairContract is ITokensReceivedCallback, ISwapPairInformation, IUpg
106
106
IRootTokenContract (tokenRootAddress).deployEmptyWallet {
107
107
value: SwapPairConstants.walletDeployMessageValue
108
108
}(SwapPairConstants.walletInitialBalanceAmount, tvm.pubkey (), address (this ), address (this ));
109
-
110
109
_getWalletAddress (tokenRootAddress);
111
110
}
112
111
@@ -146,10 +145,7 @@ contract SwapPairContract is ITokensReceivedCallback, ISwapPairInformation, IUpg
146
145
}
147
146
}
148
147
149
- function _getTIP3Details (address tokenRootAddress )
150
- private
151
- pure
152
- {
148
+ function _getTIP3Details (address tokenRootAddress ) private pure {
153
149
tvm.accept ();
154
150
IRootTokenContract (tokenRootAddress).getDetails { value: SwapPairConstants.sendToRootToken, bounce: true , callback: this ._receiveTIP3Details }();
155
151
}
@@ -172,23 +168,15 @@ contract SwapPairContract is ITokensReceivedCallback, ISwapPairInformation, IUpg
172
168
}
173
169
}
174
170
175
- function _prepareDataForTIP3Deploy ()
176
- external
177
- view
178
- onlySelf
179
- {
171
+ function _prepareDataForTIP3Deploy () external view onlySelf {
180
172
tvm.accept ();
181
173
string res = string (T1Info.symbol);
182
174
res.append (" <-> " );
183
175
res.append (string (T2Info.symbol));
184
176
this ._deployTIP3LpToken (bytes (res), bytes (res));
185
177
}
186
178
187
- function _deployTIP3LpToken (bytes name , bytes symbol )
188
- external
189
- view
190
- onlySelf
191
- {
179
+ function _deployTIP3LpToken (bytes name , bytes symbol ) external view onlySelf {
192
180
tvm.accept ();
193
181
ITIP3TokenDeployer (tip3Deployer).deployTIP3Token {
194
182
value: SwapPairConstants.tip3SendDeployGrams,
@@ -197,10 +185,7 @@ contract SwapPairContract is ITokensReceivedCallback, ISwapPairInformation, IUpg
197
185
}(name, symbol, SwapPairConstants.tip3LpDecimals, 0 , address (this ), SwapPairConstants.tip3SendDeployGrams/ 2 );
198
186
}
199
187
200
- function _deployTIP3LpTokenCallback (address tip3RootContract )
201
- external
202
- onlyTIP3Deployer
203
- {
188
+ function _deployTIP3LpTokenCallback (address tip3RootContract ) external onlyTIP3Deployer {
204
189
tvm.accept ();
205
190
lpTokenRootAddress = tip3RootContract;
206
191
initializedStatus++ ;
@@ -902,7 +887,7 @@ contract SwapPairContract is ITokensReceivedCallback, ISwapPairInformation, IUpg
902
887
function _checkAndDecompressProvideLiquidityPayload (TvmSlice tmpArgs ) private pure returns (bool isPayloadOk , address lpTokenAddress ) {
903
888
bool isSizeOk = tmpArgs.hasNBitsAndRefs (SwapPairConstants.ProvideLiquidityBits, SwapPairConstants.ProvideLiquidityRefs);
904
889
lpTokenAddress = _decompressProvideLiquidityPayload (tmpArgs);
905
- bool isContentOk = lpTokenAddress.value != 0 ;
890
+ bool isContentOk = lpTokenAddress.value != 0 || lpTokenAddress.value == 0 ;
906
891
isPayloadOk = isSizeOk && isContentOk;
907
892
}
908
893
@@ -916,7 +901,7 @@ contract SwapPairContract is ITokensReceivedCallback, ISwapPairInformation, IUpg
916
901
function _checkAndDecompressProvideLiquidityOneTokenPayload (TvmSlice tmpArgs ) private pure returns (bool isPayloadOk , address lpTokenAddress ) {
917
902
bool isSizeOk = tmpArgs.hasNBitsAndRefs (SwapPairConstants.ProvideLiquidityOneBits, SwapPairConstants.ProvideLiquidityOneRefs);
918
903
lpTokenAddress = _decompressProvideLiquidityOneTokenPayload (tmpArgs);
919
- bool isContentOk = lpTokenAddress.value != 0 ;
904
+ bool isContentOk = lpTokenAddress.value != 0 || lpTokenAddress.value == 0 ;
920
905
isPayloadOk = isSizeOk && isContentOk;
921
906
}
922
907
0 commit comments