Skip to content

Commit

Permalink
Hotfix: update spam filter to filter out 0 value external call transa…
Browse files Browse the repository at this point in the history
…ctions and show full address in tx info page
  • Loading branch information
ealymbaev committed Jan 10, 2023
1 parent b9ee338 commit fe7a056
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 21 deletions.
6 changes: 3 additions & 3 deletions UnstoppableWallet/UnstoppableWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10911,7 +10911,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.29;
MARKETING_VERSION = 0.29.1;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OfficeMode = "";
Expand Down Expand Up @@ -10985,7 +10985,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.29;
MARKETING_VERSION = 0.29.1;
MTL_ENABLE_DEBUG_INFO = NO;
OfficeMode = "";
Production = YES;
Expand Down Expand Up @@ -11265,7 +11265,7 @@
repositoryURL = "https://github.com/horizontalsystems/MarketKit.Swift";
requirement = {
kind = exactVersion;
version = 1.0.3;
version = 1.0.4;
};
};
D3604E7128F03B0A0066C366 /* XCRemoteSwiftPackageReference "ScanQrKit" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ class ExternalContractCallTransactionRecord: EvmTransactionRecord {

for event in incomingEvents + outgoingEvents {
switch event.value {
case .coinValue, .nftValue:
spam = false
case .coinValue(_, let value), .nftValue(_, let value, _, _):
if value > 0 {
spam = false
}
break
default: ()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,29 +137,52 @@ struct CellComponent {
}

static func fromToRow(tableView: UITableView, rowInfo: RowInfo, title: String, value: String, valueTitle: String?) -> RowProtocol {
CellBuilder.row(
elements: [.text, .secondaryButton],
tableView: tableView,
id: "from-to-\(rowInfo.index)",
hash: value,
height: .heightCell48,
bind: { cell in
cell.set(backgroundStyle: .lawrence, isFirst: rowInfo.isFirst, isLast: rowInfo.isLast)
let backgroundStyle: BaseThemeCell.BackgroundStyle = .lawrence
let titleFont: UIFont = .subhead2
let valueFont: UIFont = .subhead1

cell.bind(index: 0) { (component: TextComponent) in
component.font = .subhead2
return CellBuilderNew.row(
rootElement: .hStack([
.text { component in
component.font = titleFont
component.textColor = .themeGray
component.text = title
}

cell.bind(index: 1) { (component: SecondaryButtonComponent) in
component.button.set(style: .default)
component.button.setTitle(valueTitle ?? value.shortened, for: .normal)
component.button.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
component.setContentCompressionResistancePriority(.required, for: .horizontal)
},
.text { component in
component.font = valueFont
component.textColor = .themeLeah
component.text = value
component.textAlignment = .right
component.numberOfLines = 0
},
.margin8,
.secondaryCircleButton { component in
component.button.set(image: UIImage(named: "copy_20"))
component.onTap = {
CopyHelper.copyAndNotify(value: value)
}
}
]),
tableView: tableView,
id: "from-to-\(rowInfo.index)",
hash: value,
dynamicHeight: { containerWidth in
CellBuilderNew.height(
containerWidth: containerWidth,
backgroundStyle: backgroundStyle,
text: value,
font: valueFont,
elements: [
.fixed(width: TextComponent.width(font: titleFont, text: title)),
.multiline,
.margin8,
.fixed(width: SecondaryCircleButton.size)
]
)
},
bind: { cell in
cell.set(backgroundStyle: .lawrence, isFirst: rowInfo.isFirst, isLast: rowInfo.isLast)
}
)
}
Expand Down

0 comments on commit fe7a056

Please sign in to comment.