github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/systests/stellar_client_test.go (about) 1 package systests 2 3 import ( 4 "github.com/keybase/client/go/protocol/stellar1" 5 "github.com/keybase/go-framed-msgpack-rpc/rpc" 6 context "golang.org/x/net/context" 7 ) 8 9 const retryCount = 5 10 11 type stellarRetryClient struct { 12 cli stellar1.LocalClient 13 } 14 15 func newStellarRetryClient(cli *rpc.Client) *stellarRetryClient { 16 return &stellarRetryClient{ 17 cli: stellar1.LocalClient{Cli: cli}, 18 } 19 } 20 21 func (s *stellarRetryClient) GetWalletAccountsLocal(ctx context.Context, sid int) (res []stellar1.WalletAccountLocal, err error) { 22 for i := 0; i < retryCount; i++ { 23 res, err = s.cli.GetWalletAccountsLocal(ctx, sid) 24 if err == nil { 25 break 26 } 27 } 28 return res, err 29 } 30 31 func (s *stellarRetryClient) GetWalletAccountLocal(ctx context.Context, arg stellar1.GetWalletAccountLocalArg) (res stellar1.WalletAccountLocal, err error) { 32 for i := 0; i < retryCount; i++ { 33 res, err = s.cli.GetWalletAccountLocal(ctx, arg) 34 if err == nil { 35 break 36 } 37 } 38 return res, err 39 } 40 41 func (s *stellarRetryClient) GetAccountAssetsLocal(ctx context.Context, arg stellar1.GetAccountAssetsLocalArg) (res []stellar1.AccountAssetLocal, err error) { 42 for i := 0; i < retryCount; i++ { 43 res, err = s.cli.GetAccountAssetsLocal(ctx, arg) 44 if err == nil { 45 break 46 } 47 } 48 return res, err 49 } 50 51 func (s *stellarRetryClient) GetPaymentsLocal(ctx context.Context, arg stellar1.GetPaymentsLocalArg) (res stellar1.PaymentsPageLocal, err error) { 52 for i := 0; i < retryCount; i++ { 53 res, err = s.cli.GetPaymentsLocal(ctx, arg) 54 if err == nil { 55 break 56 } 57 } 58 return res, err 59 } 60 61 func (s *stellarRetryClient) GetPendingPaymentsLocal(ctx context.Context, arg stellar1.GetPendingPaymentsLocalArg) (res []stellar1.PaymentOrErrorLocal, err error) { 62 for i := 0; i < retryCount; i++ { 63 res, err = s.cli.GetPendingPaymentsLocal(ctx, arg) 64 if err == nil { 65 break 66 } 67 } 68 return res, err 69 } 70 71 func (s *stellarRetryClient) GetPaymentDetailsLocal(ctx context.Context, arg stellar1.GetPaymentDetailsLocalArg) (res stellar1.PaymentDetailsLocal, err error) { 72 for i := 0; i < retryCount; i++ { 73 res, err = s.cli.GetPaymentDetailsLocal(ctx, arg) 74 if err == nil { 75 break 76 } 77 } 78 return res, err 79 } 80 81 func (s *stellarRetryClient) GetGenericPaymentDetailsLocal(ctx context.Context, arg stellar1.GetGenericPaymentDetailsLocalArg) (res stellar1.PaymentDetailsLocal, err error) { 82 for i := 0; i < retryCount; i++ { 83 res, err = s.cli.GetGenericPaymentDetailsLocal(ctx, arg) 84 if err == nil { 85 break 86 } 87 } 88 return res, err 89 } 90 91 func (s *stellarRetryClient) GetDisplayCurrenciesLocal(ctx context.Context, sid int) (res []stellar1.CurrencyLocal, err error) { 92 for i := 0; i < retryCount; i++ { 93 res, err = s.cli.GetDisplayCurrenciesLocal(ctx, sid) 94 if err == nil { 95 break 96 } 97 } 98 return res, err 99 } 100 101 func (s *stellarRetryClient) ValidateAccountIDLocal(ctx context.Context, arg stellar1.ValidateAccountIDLocalArg) (err error) { 102 for i := 0; i < retryCount; i++ { 103 err = s.cli.ValidateAccountIDLocal(ctx, arg) 104 if err == nil { 105 break 106 } 107 } 108 return err 109 } 110 111 func (s *stellarRetryClient) ValidateSecretKeyLocal(ctx context.Context, arg stellar1.ValidateSecretKeyLocalArg) (err error) { 112 for i := 0; i < retryCount; i++ { 113 err = s.cli.ValidateSecretKeyLocal(ctx, arg) 114 if err == nil { 115 break 116 } 117 } 118 return err 119 } 120 121 func (s *stellarRetryClient) ValidateAccountNameLocal(ctx context.Context, arg stellar1.ValidateAccountNameLocalArg) (err error) { 122 for i := 0; i < retryCount; i++ { 123 err = s.cli.ValidateAccountNameLocal(ctx, arg) 124 if err == nil { 125 break 126 } 127 } 128 return err 129 } 130 131 func (s *stellarRetryClient) ChangeWalletAccountNameLocal(ctx context.Context, arg stellar1.ChangeWalletAccountNameLocalArg) (acct stellar1.WalletAccountLocal, err error) { 132 for i := 0; i < retryCount; i++ { 133 acct, err = s.cli.ChangeWalletAccountNameLocal(ctx, arg) 134 if err == nil { 135 break 136 } 137 } 138 return acct, err 139 } 140 141 func (s *stellarRetryClient) SetWalletAccountAsDefaultLocal(ctx context.Context, arg stellar1.SetWalletAccountAsDefaultLocalArg) (accts []stellar1.WalletAccountLocal, err error) { 142 for i := 0; i < retryCount; i++ { 143 accts, err = s.cli.SetWalletAccountAsDefaultLocal(ctx, arg) 144 if err == nil { 145 break 146 } 147 } 148 return accts, err 149 } 150 151 func (s *stellarRetryClient) DeleteWalletAccountLocal(ctx context.Context, arg stellar1.DeleteWalletAccountLocalArg) (err error) { 152 for i := 0; i < retryCount; i++ { 153 err = s.cli.DeleteWalletAccountLocal(ctx, arg) 154 if err == nil { 155 break 156 } 157 } 158 return err 159 } 160 161 func (s *stellarRetryClient) LinkNewWalletAccountLocal(ctx context.Context, arg stellar1.LinkNewWalletAccountLocalArg) (res stellar1.AccountID, err error) { 162 for i := 0; i < retryCount; i++ { 163 res, err = s.cli.LinkNewWalletAccountLocal(ctx, arg) 164 if err == nil { 165 break 166 } 167 } 168 return res, err 169 } 170 171 func (s *stellarRetryClient) CreateWalletAccountLocal(ctx context.Context, arg stellar1.CreateWalletAccountLocalArg) (res stellar1.AccountID, err error) { 172 for i := 0; i < retryCount; i++ { 173 res, err = s.cli.CreateWalletAccountLocal(ctx, arg) 174 if err == nil { 175 break 176 } 177 } 178 return res, err 179 } 180 181 func (s *stellarRetryClient) ChangeDisplayCurrencyLocal(ctx context.Context, arg stellar1.ChangeDisplayCurrencyLocalArg) (res stellar1.CurrencyLocal, err error) { 182 for i := 0; i < retryCount; i++ { 183 res, err = s.cli.ChangeDisplayCurrencyLocal(ctx, arg) 184 if err == nil { 185 break 186 } 187 } 188 return res, err 189 } 190 191 func (s *stellarRetryClient) GetDisplayCurrencyLocal(ctx context.Context, arg stellar1.GetDisplayCurrencyLocalArg) (res stellar1.CurrencyLocal, err error) { 192 for i := 0; i < retryCount; i++ { 193 res, err = s.cli.GetDisplayCurrencyLocal(ctx, arg) 194 if err == nil { 195 break 196 } 197 } 198 return res, err 199 } 200 201 func (s *stellarRetryClient) HasAcceptedDisclaimerLocal(ctx context.Context, sid int) (res bool, err error) { 202 for i := 0; i < retryCount; i++ { 203 res, err = s.cli.HasAcceptedDisclaimerLocal(ctx, sid) 204 if err == nil { 205 break 206 } 207 } 208 return res, err 209 } 210 211 func (s *stellarRetryClient) AcceptDisclaimerLocal(ctx context.Context, sid int) (err error) { 212 for i := 0; i < retryCount; i++ { 213 err = s.cli.AcceptDisclaimerLocal(ctx, sid) 214 if err == nil { 215 break 216 } 217 } 218 return err 219 } 220 221 func (s *stellarRetryClient) GetWalletAccountPublicKeyLocal(ctx context.Context, arg stellar1.GetWalletAccountPublicKeyLocalArg) (res string, err error) { 222 for i := 0; i < retryCount; i++ { 223 res, err = s.cli.GetWalletAccountPublicKeyLocal(ctx, arg) 224 if err == nil { 225 break 226 } 227 } 228 return res, err 229 } 230 231 func (s *stellarRetryClient) GetWalletAccountSecretKeyLocal(ctx context.Context, arg stellar1.GetWalletAccountSecretKeyLocalArg) (res stellar1.SecretKey, err error) { 232 for i := 0; i < retryCount; i++ { 233 res, err = s.cli.GetWalletAccountSecretKeyLocal(ctx, arg) 234 if err == nil { 235 break 236 } 237 } 238 return res, err 239 } 240 241 func (s *stellarRetryClient) GetSendAssetChoicesLocal(ctx context.Context, arg stellar1.GetSendAssetChoicesLocalArg) (res []stellar1.SendAssetChoiceLocal, err error) { 242 for i := 0; i < retryCount; i++ { 243 res, err = s.cli.GetSendAssetChoicesLocal(ctx, arg) 244 if err == nil { 245 break 246 } 247 } 248 return res, err 249 } 250 251 func (s *stellarRetryClient) BuildRequestLocal(ctx context.Context, arg stellar1.BuildRequestLocalArg) (res stellar1.BuildRequestResLocal, err error) { 252 for i := 0; i < retryCount; i++ { 253 res, err = s.cli.BuildRequestLocal(ctx, arg) 254 if err == nil { 255 break 256 } 257 } 258 return res, err 259 260 } 261 262 func (s *stellarRetryClient) StartBuildPaymentLocal(ctx context.Context, arg int) (res stellar1.BuildPaymentID, err error) { 263 for i := 0; i < retryCount; i++ { 264 res, err = s.cli.StartBuildPaymentLocal(ctx, arg) 265 if err == nil { 266 break 267 } 268 } 269 return res, err 270 } 271 272 func (s *stellarRetryClient) StopBuildPaymentLocal(ctx context.Context, arg stellar1.StopBuildPaymentLocalArg) (err error) { 273 for i := 0; i < retryCount; i++ { 274 err = s.cli.StopBuildPaymentLocal(ctx, arg) 275 if err == nil { 276 break 277 } 278 } 279 return err 280 } 281 282 func (s *stellarRetryClient) BuildPaymentLocal(ctx context.Context, arg stellar1.BuildPaymentLocalArg) (res stellar1.BuildPaymentResLocal, err error) { 283 for i := 0; i < retryCount; i++ { 284 res, err = s.cli.BuildPaymentLocal(ctx, arg) 285 if err == nil { 286 break 287 } 288 } 289 return res, err 290 } 291 292 func (s *stellarRetryClient) ReviewPaymentLocal(ctx context.Context, arg stellar1.ReviewPaymentLocalArg) (err error) { 293 for i := 0; i < retryCount; i++ { 294 err = s.cli.ReviewPaymentLocal(ctx, arg) 295 if err == nil { 296 break 297 } 298 } 299 return err 300 } 301 302 func (s *stellarRetryClient) SendPaymentLocal(ctx context.Context, arg stellar1.SendPaymentLocalArg) (res stellar1.SendPaymentResLocal, err error) { 303 for i := 0; i < retryCount; i++ { 304 res, err = s.cli.SendPaymentLocal(ctx, arg) 305 if err == nil { 306 break 307 } 308 } 309 return res, err 310 } 311 312 func (s *stellarRetryClient) GetRequestDetailsLocal(ctx context.Context, arg stellar1.GetRequestDetailsLocalArg) (res stellar1.RequestDetailsLocal, err error) { 313 for i := 0; i < retryCount; i++ { 314 res, err = s.cli.GetRequestDetailsLocal(ctx, arg) 315 if err == nil { 316 break 317 } 318 } 319 return res, err 320 } 321 322 func (s *stellarRetryClient) CancelRequestLocal(ctx context.Context, arg stellar1.CancelRequestLocalArg) (err error) { 323 for i := 0; i < retryCount; i++ { 324 err = s.cli.CancelRequestLocal(ctx, arg) 325 if err == nil { 326 break 327 } 328 } 329 return err 330 } 331 332 func (s *stellarRetryClient) CancelPaymentLocal(ctx context.Context, arg stellar1.CancelPaymentLocalArg) (res stellar1.RelayClaimResult, err error) { 333 for i := 0; i < retryCount; i++ { 334 res, err = s.cli.CancelPaymentLocal(ctx, arg) 335 if err == nil { 336 break 337 } 338 } 339 return res, err 340 } 341 342 func (s *stellarRetryClient) BalancesLocal(ctx context.Context, arg stellar1.AccountID) (res []stellar1.Balance, err error) { 343 for i := 0; i < retryCount; i++ { 344 res, err = s.cli.BalancesLocal(ctx, arg) 345 if err == nil { 346 break 347 } 348 } 349 return res, err 350 } 351 352 func (s *stellarRetryClient) SendCLILocal(ctx context.Context, arg stellar1.SendCLILocalArg) (res stellar1.SendResultCLILocal, err error) { 353 for i := 0; i < retryCount; i++ { 354 res, err = s.cli.SendCLILocal(ctx, arg) 355 if err == nil { 356 break 357 } 358 } 359 return res, err 360 } 361 362 func (s *stellarRetryClient) ClaimCLILocal(ctx context.Context, arg stellar1.ClaimCLILocalArg) (res stellar1.RelayClaimResult, err error) { 363 for i := 0; i < retryCount; i++ { 364 res, err = s.cli.ClaimCLILocal(ctx, arg) 365 if err == nil { 366 break 367 } 368 } 369 return res, err 370 } 371 372 func (s *stellarRetryClient) RecentPaymentsCLILocal(ctx context.Context, acctID *stellar1.AccountID) (res []stellar1.PaymentOrErrorCLILocal, err error) { 373 for i := 0; i < retryCount; i++ { 374 res, err = s.cli.RecentPaymentsCLILocal(ctx, acctID) 375 if err == nil { 376 break 377 } 378 } 379 return res, err 380 } 381 382 func (s *stellarRetryClient) PaymentDetailCLILocal(ctx context.Context, txID string) (res stellar1.PaymentCLILocal, err error) { 383 for i := 0; i < retryCount; i++ { 384 res, err = s.cli.PaymentDetailCLILocal(ctx, txID) 385 if err == nil { 386 break 387 } 388 } 389 return res, err 390 } 391 392 func (s *stellarRetryClient) WalletInitLocal(ctx context.Context) (err error) { 393 for i := 0; i < retryCount; i++ { 394 err = s.cli.WalletInitLocal(ctx) 395 if err == nil { 396 break 397 } 398 } 399 return err 400 } 401 402 func (s *stellarRetryClient) WalletDumpLocal(ctx context.Context) (res stellar1.Bundle, err error) { 403 for i := 0; i < retryCount; i++ { 404 res, err = s.cli.WalletDumpLocal(ctx) 405 if err == nil { 406 break 407 } 408 } 409 return res, err 410 } 411 412 func (s *stellarRetryClient) WalletGetAccountsCLILocal(ctx context.Context) (res []stellar1.OwnAccountCLILocal, err error) { 413 for i := 0; i < retryCount; i++ { 414 res, err = s.cli.WalletGetAccountsCLILocal(ctx) 415 if err == nil { 416 break 417 } 418 } 419 return res, err 420 } 421 422 func (s *stellarRetryClient) OwnAccountLocal(ctx context.Context, arg stellar1.AccountID) (res bool, err error) { 423 for i := 0; i < retryCount; i++ { 424 res, err = s.cli.OwnAccountLocal(ctx, arg) 425 if err == nil { 426 break 427 } 428 } 429 return res, err 430 } 431 432 func (s *stellarRetryClient) ImportSecretKeyLocal(ctx context.Context, arg stellar1.ImportSecretKeyLocalArg) (err error) { 433 for i := 0; i < retryCount; i++ { 434 err = s.cli.ImportSecretKeyLocal(ctx, arg) 435 if err == nil { 436 break 437 } 438 } 439 return err 440 } 441 442 func (s *stellarRetryClient) ExportSecretKeyLocal(ctx context.Context, arg stellar1.AccountID) (res stellar1.SecretKey, err error) { 443 for i := 0; i < retryCount; i++ { 444 res, err = s.cli.ExportSecretKeyLocal(ctx, arg) 445 if err == nil { 446 break 447 } 448 } 449 return res, err 450 } 451 452 func (s *stellarRetryClient) SetDisplayCurrency(ctx context.Context, arg stellar1.SetDisplayCurrencyArg) (err error) { 453 for i := 0; i < retryCount; i++ { 454 err = s.cli.SetDisplayCurrency(ctx, arg) 455 if err == nil { 456 break 457 } 458 } 459 return err 460 } 461 462 func (s *stellarRetryClient) ExchangeRateLocal(ctx context.Context, arg stellar1.OutsideCurrencyCode) (res stellar1.OutsideExchangeRate, err error) { 463 for i := 0; i < retryCount; i++ { 464 res, err = s.cli.ExchangeRateLocal(ctx, arg) 465 if err == nil { 466 break 467 } 468 } 469 return res, err 470 } 471 472 func (s *stellarRetryClient) GetAvailableLocalCurrencies(ctx context.Context) (res map[stellar1.OutsideCurrencyCode]stellar1.OutsideCurrencyDefinition, err error) { 473 for i := 0; i < retryCount; i++ { 474 res, err = s.cli.GetAvailableLocalCurrencies(ctx) 475 if err == nil { 476 break 477 } 478 } 479 return res, err 480 } 481 482 func (s *stellarRetryClient) FormatLocalCurrencyString(ctx context.Context, arg stellar1.FormatLocalCurrencyStringArg) (res string, err error) { 483 for i := 0; i < retryCount; i++ { 484 res, err = s.cli.FormatLocalCurrencyString(ctx, arg) 485 if err == nil { 486 break 487 } 488 } 489 return res, err 490 } 491 492 func (s *stellarRetryClient) MakeRequestLocal(ctx context.Context, arg stellar1.MakeRequestLocalArg) (res stellar1.KeybaseRequestID, err error) { 493 for i := 0; i < retryCount; i++ { 494 res, err = s.cli.MakeRequestLocal(ctx, arg) 495 if err == nil { 496 break 497 } 498 } 499 return res, err 500 } 501 502 func (s *stellarRetryClient) MakeRequestCLILocal(ctx context.Context, arg stellar1.MakeRequestCLILocalArg) (res stellar1.KeybaseRequestID, err error) { 503 for i := 0; i < retryCount; i++ { 504 res, err = s.cli.MakeRequestCLILocal(ctx, arg) 505 if err == nil { 506 break 507 } 508 } 509 return res, err 510 } 511 512 func (s *stellarRetryClient) LookupCLILocal(ctx context.Context, name string) (res stellar1.LookupResultCLILocal, err error) { 513 for i := 0; i < retryCount; i++ { 514 res, err = s.cli.LookupCLILocal(ctx, name) 515 if err == nil { 516 break 517 } 518 } 519 return res, err 520 } 521 522 func (s *stellarRetryClient) MarkAsReadLocal(ctx context.Context, arg stellar1.MarkAsReadLocalArg) error { 523 var err error 524 for i := 0; i < retryCount; i++ { 525 err = s.cli.MarkAsReadLocal(ctx, arg) 526 if err == nil { 527 break 528 } 529 } 530 return err 531 } 532 533 func (s *stellarRetryClient) IsAccountMobileOnlyLocal(ctx context.Context, arg stellar1.IsAccountMobileOnlyLocalArg) (bool, error) { 534 var err error 535 var mobileOnly bool 536 for i := 0; i < retryCount; i++ { 537 mobileOnly, err = s.cli.IsAccountMobileOnlyLocal(ctx, arg) 538 if err == nil { 539 break 540 } 541 } 542 return mobileOnly, err 543 } 544 545 func (s *stellarRetryClient) SetAccountMobileOnlyLocal(ctx context.Context, arg stellar1.SetAccountMobileOnlyLocalArg) error { 546 var err error 547 for i := 0; i < retryCount; i++ { 548 err = s.cli.SetAccountMobileOnlyLocal(ctx, arg) 549 if err == nil { 550 break 551 } 552 } 553 return err 554 } 555 556 func (s *stellarRetryClient) SetAccountAllDevicesLocal(ctx context.Context, arg stellar1.SetAccountAllDevicesLocalArg) error { 557 var err error 558 for i := 0; i < retryCount; i++ { 559 err = s.cli.SetAccountAllDevicesLocal(ctx, arg) 560 if err == nil { 561 break 562 } 563 } 564 return err 565 } 566 567 func (s *stellarRetryClient) SetInflationDestinationLocal(ctx context.Context, arg stellar1.SetInflationDestinationLocalArg) (err error) { 568 for i := 0; i < retryCount; i++ { 569 err = s.cli.SetInflationDestinationLocal(ctx, arg) 570 if err == nil { 571 break 572 } 573 } 574 return err 575 } 576 577 func (s *stellarRetryClient) GetInflationDestinationLocal(ctx context.Context, arg stellar1.GetInflationDestinationLocalArg) (res stellar1.InflationDestinationResultLocal, err error) { 578 for i := 0; i < retryCount; i++ { 579 res, err = s.cli.GetInflationDestinationLocal(ctx, arg) 580 if err == nil { 581 break 582 } 583 } 584 return res, err 585 } 586 587 func (s *stellarRetryClient) GetPredefinedInflationDestinationsLocal(ctx context.Context, sessionID int) (res []stellar1.PredefinedInflationDestination, err error) { 588 for i := 0; i < retryCount; i++ { 589 res, err = s.cli.GetPredefinedInflationDestinationsLocal(ctx, sessionID) 590 if err == nil { 591 break 592 } 593 } 594 return res, err 595 } 596 597 func (s *stellarRetryClient) BatchLocal(ctx context.Context, arg stellar1.BatchLocalArg) (res stellar1.BatchResultLocal, err error) { 598 for i := 0; i < retryCount; i++ { 599 res, err = s.cli.BatchLocal(ctx, arg) 600 if err == nil { 601 break 602 } 603 } 604 return res, err 605 } 606 607 func (s *stellarRetryClient) AccountMergeCLILocal(ctx context.Context, arg stellar1.AccountMergeCLILocalArg) (res stellar1.TransactionID, err error) { 608 for i := 0; i < retryCount; i++ { 609 res, err = s.cli.AccountMergeCLILocal(ctx, arg) 610 if err == nil { 611 return res, nil 612 } 613 } 614 return res, err 615 } 616 617 func (s *stellarRetryClient) AirdropDetailsLocal(ctx context.Context, sessionID int) (res stellar1.AirdropDetails, err error) { 618 for i := 0; i < retryCount; i++ { 619 res, err = s.cli.AirdropDetailsLocal(ctx, sessionID) 620 if err == nil { 621 break 622 } 623 } 624 return res, err 625 } 626 627 func (s *stellarRetryClient) AirdropRegisterLocal(ctx context.Context, arg stellar1.AirdropRegisterLocalArg) (err error) { 628 for i := 0; i < retryCount; i++ { 629 err = s.cli.AirdropRegisterLocal(ctx, arg) 630 if err == nil { 631 break 632 } 633 } 634 return err 635 } 636 637 func (s *stellarRetryClient) AirdropStatusLocal(ctx context.Context, sessionID int) (res stellar1.AirdropStatus, err error) { 638 for i := 0; i < retryCount; i++ { 639 res, err = s.cli.AirdropStatusLocal(ctx, sessionID) 640 if err == nil { 641 break 642 } 643 } 644 return res, err 645 } 646 647 func (s *stellarRetryClient) AddTrustlineLocal(ctx context.Context, arg stellar1.AddTrustlineLocalArg) (err error) { 648 for i := 0; i < retryCount; i++ { 649 err = s.cli.AddTrustlineLocal(ctx, arg) 650 if err == nil { 651 break 652 } 653 } 654 return err 655 } 656 657 func (s *stellarRetryClient) DeleteTrustlineLocal(ctx context.Context, arg stellar1.DeleteTrustlineLocalArg) (err error) { 658 for i := 0; i < retryCount; i++ { 659 err = s.cli.DeleteTrustlineLocal(ctx, arg) 660 if err == nil { 661 break 662 } 663 } 664 return err 665 } 666 667 func (s *stellarRetryClient) ChangeTrustlineLimitLocal(ctx context.Context, arg stellar1.ChangeTrustlineLimitLocalArg) (err error) { 668 for i := 0; i < retryCount; i++ { 669 err = s.cli.ChangeTrustlineLimitLocal(ctx, arg) 670 if err == nil { 671 break 672 } 673 } 674 return err 675 } 676 677 func (s *stellarRetryClient) GetTrustlinesLocal(ctx context.Context, arg stellar1.GetTrustlinesLocalArg) (ret []stellar1.Balance, err error) { 678 for i := 0; i < retryCount; i++ { 679 ret, err = s.cli.GetTrustlinesLocal(ctx, arg) 680 if err == nil { 681 break 682 } 683 } 684 return ret, err 685 } 686 687 func (s *stellarRetryClient) GetTrustlinesForRecipientLocal(ctx context.Context, arg stellar1.GetTrustlinesForRecipientLocalArg) (ret stellar1.RecipientTrustlinesLocal, err error) { 688 for i := 0; i < retryCount; i++ { 689 ret, err = s.cli.GetTrustlinesForRecipientLocal(ctx, arg) 690 if err == nil { 691 break 692 } 693 } 694 return ret, err 695 } 696 697 func (s *stellarRetryClient) FindPaymentPathLocal(ctx context.Context, arg stellar1.FindPaymentPathLocalArg) (ret stellar1.PaymentPathLocal, err error) { 698 for i := 0; i < retryCount; i++ { 699 ret, err = s.cli.FindPaymentPathLocal(ctx, arg) 700 if err == nil { 701 return ret, nil 702 } 703 } 704 return stellar1.PaymentPathLocal{}, err 705 } 706 707 func (s *stellarRetryClient) SendPathCLILocal(ctx context.Context, arg stellar1.SendPathCLILocalArg) (ret stellar1.SendResultCLILocal, err error) { 708 for i := 0; i < retryCount; i++ { 709 ret, err = s.cli.SendPathCLILocal(ctx, arg) 710 if err == nil { 711 return ret, nil 712 } 713 } 714 return stellar1.SendResultCLILocal{}, err 715 } 716 717 func (s *stellarRetryClient) SendPathLocal(ctx context.Context, arg stellar1.SendPathLocalArg) (ret stellar1.SendPaymentResLocal, err error) { 718 for i := 0; i < retryCount; i++ { 719 ret, err = s.cli.SendPathLocal(ctx, arg) 720 if err == nil { 721 return ret, nil 722 } 723 } 724 return stellar1.SendPaymentResLocal{}, err 725 } 726 727 func (s *stellarRetryClient) ApproveTxURILocal(ctx context.Context, arg stellar1.ApproveTxURILocalArg) (stellar1.TransactionID, error) { 728 return s.cli.ApproveTxURILocal(ctx, arg) 729 } 730 731 func (s *stellarRetryClient) ApprovePayURILocal(ctx context.Context, arg stellar1.ApprovePayURILocalArg) (stellar1.TransactionID, error) { 732 return s.cli.ApprovePayURILocal(ctx, arg) 733 } 734 735 func (s *stellarRetryClient) ApprovePathURILocal(ctx context.Context, arg stellar1.ApprovePathURILocalArg) (stellar1.TransactionID, error) { 736 return s.cli.ApprovePathURILocal(ctx, arg) 737 } 738 739 func (s *stellarRetryClient) ValidateStellarURILocal(ctx context.Context, arg stellar1.ValidateStellarURILocalArg) (stellar1.ValidateStellarURIResultLocal, error) { 740 return s.cli.ValidateStellarURILocal(ctx, arg) 741 } 742 743 func (s *stellarRetryClient) GetPartnerUrlsLocal(ctx context.Context, sessionID int) ([]stellar1.PartnerUrl, error) { 744 return s.cli.GetPartnerUrlsLocal(ctx, sessionID) 745 } 746 747 func (s *stellarRetryClient) SignTransactionXdrLocal(ctx context.Context, arg stellar1.SignTransactionXdrLocalArg) (res stellar1.SignXdrResult, err error) { 748 return s.cli.SignTransactionXdrLocal(ctx, arg) 749 } 750 751 func (s *stellarRetryClient) FuzzyAssetSearchLocal(ctx context.Context, arg stellar1.FuzzyAssetSearchLocalArg) (res []stellar1.Asset, err error) { 752 return s.cli.FuzzyAssetSearchLocal(ctx, arg) 753 } 754 755 func (s *stellarRetryClient) ListPopularAssetsLocal(ctx context.Context, sessionID int) (res stellar1.AssetListResult, err error) { 756 return s.cli.ListPopularAssetsLocal(ctx, sessionID) 757 } 758 759 func (s *stellarRetryClient) GetStaticConfigLocal(ctx context.Context) (res stellar1.StaticConfig, err error) { 760 return s.cli.GetStaticConfigLocal(ctx) 761 } 762 763 func (s *stellarRetryClient) AssetDepositLocal(ctx context.Context, arg stellar1.AssetDepositLocalArg) (stellar1.AssetActionResultLocal, error) { 764 return s.cli.AssetDepositLocal(ctx, arg) 765 } 766 767 func (s *stellarRetryClient) AssetWithdrawLocal(ctx context.Context, arg stellar1.AssetWithdrawLocalArg) (stellar1.AssetActionResultLocal, error) { 768 return s.cli.AssetWithdrawLocal(ctx, arg) 769 } 770 771 var _ stellar1.LocalInterface = (*stellarRetryClient)(nil)