Skip to content

Commit

Permalink
fix: sends about zennies for zingo do not have Memo
Browse files Browse the repository at this point in the history
  • Loading branch information
juanky201271 committed Jul 19, 2024
1 parent 33962a7 commit d97bb3f
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 20 deletions.
4 changes: 2 additions & 2 deletions app/LoadedApp/LoadedApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -917,8 +917,8 @@ export class LoadedAppClass extends Component<LoadedAppClassProps, LoadedAppClas
sendTransaction = async (setSendProgress: (arg0: SendProgressClass) => void): Promise<String> => {
try {
// Construct a sendJson from the sendPage state
const { sendPageState, uaAddress, addresses, server, donation, translate } = this.state;
const sendJson = await Utils.getSendManyJSON(sendPageState, uaAddress, addresses, server, donation, translate);
const { sendPageState, uaAddress, addresses, server, donation } = this.state;
const sendJson = await Utils.getSendManyJSON(sendPageState, uaAddress, addresses, server, donation);
const txid = await this.rpc.sendTransaction(sendJson, setSendProgress);

return txid;
Expand Down
1 change: 0 additions & 1 deletion app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"menudrawer-acc": "Open Menu Drawer",
"menu-acc": "Open Menu",
"donation": "Donation to Zingo!\nThanks for supporting ZingoLabs!",
"zennies-donation": "A Zenny for Zingo!\nThanks for supporting ZingoLabs!",
"zenny-tips-ab": "Zenny Tips",
"nym-donation": "I need Nym network security!",
"restarting": "Error connecting to the Server, the App will restart in a few seconds.",
Expand Down
1 change: 0 additions & 1 deletion app/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"menudrawer-acc": "Abrir Menú Lateral",
"menu-acc": "Abrir Menú",
"donation": "¡Donación a Zingo!\n¡Gracias por apoyar a ZingoLabs!",
"zennies-donation": "¡Un Zenny para Zingo!\n¡Gracias por apoyar a ZingoLabs!",
"zenny-tips-ab": "Zenny Propinas",
"nym-donation": "¡Necesito seguridad de red Nym!",
"restarting": "Error conectando con el servidor, la Aplicación se reiniciará en breves segundos.",
Expand Down
1 change: 0 additions & 1 deletion app/translations/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"menudrawer-acc": "Abrir Menu Lateral",
"menu-acc": "Abrir Menu",
"donation": "Doação para o Zingo!\nObrigado por apoiar o ZingoLabs!",
"zennies-donation": "Um Zenny pelo Zingo!\nObrigado por apoiar o ZingoLabs!",
"zenny-tips-ab": "Zenny Gorjetas",
"nym-donation": "Eu preciso de segurança de rede Nym!",
"restarting": "Erro ao conectar ao servidor, o aplicativo será reiniciado em alguns segundos.",
Expand Down
1 change: 0 additions & 1 deletion app/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"menudrawer-acc": "Открыть панель меню",
"menu-acc": "Открыть меню",
"donation": "Пожертвование в пользу Zingo!\nСпасибо за поддержку ZingoLabs!",
"zennies-donation": "Zenny для Zingo!\nСпасибо за поддержку ZingoLabs!",
"zenny-tips-ab": "Zenny советы",
"nym-donation": "Мне нужна сетевая безопасность Nym!",
"restarting": "Ошибка подключения к Серверу, приложение перезапустится через несколько секунд.",
Expand Down
7 changes: 1 addition & 6 deletions app/utils/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,6 @@ export default class Utils {
return '0' + decimalSeparator + '01';
}

static getZenniesDonationMemo(translate: (key: string) => TranslateType): string {
return translate('zennies-donation') as string;
}

// NYM
static async getNymDonationAddress(chainName: ChainNameEnum): Promise<string> {
// donations only for mainnet.
Expand Down Expand Up @@ -241,7 +237,6 @@ export default class Utils {
addresses: AddressClass[],
server: ServerType,
donation: boolean,
translate: (key: string) => TranslateType,
): Promise<SendJsonToTypeType[]> {
let donationAddress: boolean = false;
const json: Promise<SendJsonToTypeType[][]> = Promise.all(
Expand Down Expand Up @@ -295,7 +290,7 @@ export default class Utils {
(Utils.parseStringLocaleToNumberFloat(Utils.getZenniesDonationAmount()) * 10 ** 8).toFixed(0),
10,
),
memo: Utils.getZenniesDonationMemo(translate),
memo: '', // zancas decision to not leak info with no reason.
});
}

Expand Down
9 changes: 1 addition & 8 deletions components/Send/Send.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,7 @@ const Send: React.FunctionComponent<SendProps> = ({
sendPageStateCalculateFee.toaddr.includeUAMemo = includeUAMemo;
sendPageStateCalculateFee.toaddr.amount = amount;

sendJson = await Utils.getSendManyJSON(
sendPageStateCalculateFee,
uaAddress,
addresses,
server,
donation,
translate,
);
sendJson = await Utils.getSendManyJSON(sendPageStateCalculateFee, uaAddress, addresses, server, donation);
console.log('SEND', sendJson);
}

Expand Down

0 comments on commit d97bb3f

Please sign in to comment.